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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Html to pdf - page break cut the text & CSS

Thread ID:

Created:

Updated:

Platform:

Replies:

119203 May 21,2015 06:27 PM UTC May 22,2015 10:55 AM UTC ASP.NET Web Forms (Classic) 1
loading
Tags: PDF
Kobi Ohayon
Asked On May 21, 2015 06:27 PM UTC

How do I make the pdf to not cut the middle line if all the div did not enter until the end of the page.

I attach files:
1. html text.
2. convert code.
3. pdf file.

Attachment: Archive_595915d3.zip

Karthik Krishnaraj [Syncfusion]
Replied On May 22, 2015 10:55 AM UTC

Hi Kobi,

Thank you for using syncfusion products,

IE based HTML to PDF converter supports detecting page-break-before: always; and page-break-after: always; types of page break.

When the HTML Pages uses these page breaks, then it can be detected by the HTML converter. I have attached a KB link which explains this scenario in the below link. Provided HTML document is of unsupported page break.

KB Link:
https://www.syncfusion.com/kb/4229/how-to-add-page-break-in-html-to-pdf-conversion

Here the output document provided is bitmapped(Not selectable text), hence the page break doesn’t work properly. For this you need to enable the legacy drawing. Html Converter converts Web pages to Image using MSHTML (IE Rendering Engine), and then convert to PDF. So the contents are displayed as image .

To solve this, the key FEATURE_IVIEWOBJECTDRAW_DMLT9_WITH_GDI should be updated in the registry. Please run the utility placed in the following location to perform the above changes automatically.

$system drive:\Program Files\Syncfusion\Essential Studio\$Version # \Utilities\PDF\Legacy Drawing

After these changes please try to convert the Html to PDF which will produce the sharper selectable text. Please check the below link for more information and let us know if issue still reproduces.

Link:

http://msdn.microsoft.com/en-us/library/ee330732(v=vs.85).aspx#iviewobject_draw

Thanks,

Karthik.


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.

Warning Icon 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.Close Icon

;