We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Page Breaks not working with HtmlToPdfConverter

Thread ID:

Created:

Updated:

Platform:

Replies:

128390 Jan 18,2017 11:14 AM Jan 22,2017 11:50 PM ASP.NET MVC 5
loading
Tags: PDF
Matt M
Asked On January 18, 2017 11:14 AM

Hi There,

I am trying to use HtmlToPdfConverter from the Syncfusion.HtmlToPdfConverter46 nuget package with WebKit to save an HTML page to PDF.  If I try to add a page break using "page-break-after: always;", I just end up with it adding half a page of white space to the document, but with no page break.   Even testing with:
<div>
    hello world
</div>

<p style="page-break-after: always;"></p>
<div>
    hello world
</div>

Results in a document of length one page with "hello world" at the top, and halfway down the page.   Is there something I have missed in using the page break functionality?

Thanks

Prakash Viswanathan [Syncfusion]
Replied On January 19, 2017 05:29 AM

Hi Matt, 
 
Thanks for contacting Syncfusion support. 
 
We have fixed few similar issues related to page break in our WebKit HTML converter in our 2016 volume 3 release (Essential Studio version: 14.3.0.52). We have checked the reported functionalities in our current WebKit HTML converter with the input you have provided, it works fine. I have attached the output PDF document which is converted using latest WebKit HTML converter. If this behavior is acceptable, please upgrade to latest version of WebKit HTML converter. 
 
Latest WebKit HTML converter:  https://www.syncfusion.com/downloads/latest-version  
 
Please let us know if you need any further assistance on this. 
 
Regards, 
Prakash V. 


Matt M
Replied On January 19, 2017 06:54 AM

Hi,

I have tried using WebKit HTML Converter versions 14.3.052, 14.4.0.15, and 14.4.0.20 but all of them have the problem with page breaks.  They all just add white space with no page break.  What was the exact version number you used to create your PDF?  What is the current version (14.4.0.15 or 14.4.0.20)?

Thanks

Prakash Viswanathan [Syncfusion]
Replied On January 20, 2017 06:22 AM

Hi Matt, 
 
Current version of WebKit HTML converter: 14.4.0.20 
 
I have generated the PDF using 14.4.0.15 version. I have attached a sample with 14.4.0.15 version. Please find the sample from below link, 
 
Note: We have made changes in QtBinaries in each version of WebKit HTML converter. Make sure you are using same version of QtBinaries and Syncfusion assemblies. 
 
If still the issue reproducing, please share us the code snippet and sample which will helpful for us to proceed further. 
 
Regards, 
Prakash V. 


Matt M
Replied On January 20, 2017 08:07 AM

Prakash,

You were right!  I needed to update my QtBinaries to match the version of the converter I was using.

The page breaks work perfectly now.

Thnkas

Prakash Viswanathan [Syncfusion]
Replied On January 22, 2017 11:50 PM

Hi Matt, 
 
Thanks for your update, please let us know if you need any further assistance. 
 
Regards, 
Prakash V. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;