PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

PDFSharp PdfGenerator - page breaks splitting lines of text
https://forum.pdfsharp.net/viewtopic.php?f=2&t=3645
Page 1 of 1

Author:  tkerwood [ Thu Aug 24, 2017 3:31 am ]
Post subject:  PDFSharp PdfGenerator - page breaks splitting lines of text

I am using..
PdfDocument pdf = PdfGenerator.GeneratePdf(body, PageSize.A4);
and i have the "page-break-inside" css style (as per https://github.com/ArthurHub/HTML-Renderer/pull/41), but it is still splitting lines.
<div style="page-break-inside: avoid;" >
I have attached some sample images. I have added a dashed border to the html body to help demonstrate is perimeter.

Here is a snippet of my html.
<div class="payment-wrapper" style="page-break-inside: avoid;" >
<h4>{DueDateLabel} {InvoiceDueDate}</h4>
<div>Back account details for electronic payment:</div>
<div>Bank BSB : {Bsb} Account : {AccountNumber}</div>
<div>Account Name : {AccountName}</div>
<div>Please quote invoice number in your payment or </div>
<div>email remittance to {DebtorEmail}</div>
<p>{PaymentDueInDaysStatement}</p>
</div>
Any advice would be appreciated.

Attachments:
PDF_Invoice_lines_split_accross_pages_smaller_margins.PNG
PDF_Invoice_lines_split_accross_pages_smaller_margins.PNG [ 110.71 KiB | Viewed 9301 times ]
PDF_Invoice_lines_split_accross_pages.PNG
PDF_Invoice_lines_split_accross_pages.PNG [ 119.71 KiB | Viewed 9301 times ]
PDF_Invoice_footer_split_accross_pages.PNG
PDF_Invoice_footer_split_accross_pages.PNG [ 83.69 KiB | Viewed 9301 times ]

Author:  Thomas Hoevel [ Thu Aug 24, 2017 7:54 am ]
Post subject:  Re: PDFSharp PdfGenerator - page breaks splitting lines of t

Hi!
tkerwood wrote:
I am using..
PdfDocument pdf = PdfGenerator.GeneratePdf(body, PageSize.A4);
The good news (for us): this is not our product.
I cannot help you and it is unlikely that someone else on this forum will be able to help.

A similar question was asked and answered on StackOverflow:
https://stackoverflow.com/q/37660448/162529

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/