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.

Specify a page break in code or CSS

Thread ID:





106254 Dec 19,2012 12:47 PM Dec 21,2012 02:24 AM ASP.NET Web Forms (Classic) 1
Tags: PDF
Administrator [Syncfusion]
Asked On December 19, 2012 12:47 PM

I'm generating a PDF off a page with a lot of dynamic content.  I want to be able to ensure the page break happens in an acceptable place.  Is there a way to specify where in the HTML content a page breaks?  I tried using something like page-break-before CSS styles, but that doesn't affect the breaking.

Geetha M [Syncfusion]
Replied On December 21, 2012 02:24 AM

Hi Brian,

Thank you for your interest in Syncfusion products.

If the page breaks are specified in the HTML, then it can be applied in the converted PDF document by turning on the following property:

HtmlConverter.AutoDetectPageBreak = true;

By default, this property is set to false which makes the PDF to break only for the PdfPage size. Turning on this property will ensure page breaks in HTML along with PdfPage breaks.

Please try this and let me know if you have any questions.



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.