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

Specify a page break in code or CSS

Thread ID:





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

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 07:24 AM UTC

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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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