define area by page break

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF Converter for .NET (v1)  /  define area by page break

DynamicPDF Converter for .NET (v1) Forum

 Jul 22 2015 11:56 AM
I am looking for a way to break the converted pages on a page break. Is it possible?
 Jul 22 2015 4:27 PM
Posted by a ceTe Software moderator
Hello,

The DynamicPDF Converter for .NET library does not have the capability to directly insert a page break at any desired location. However, if you are converting HTML to PDF and have complete control over the HTML being converted, you could insert page breaks in the HTML itself that will cause the page break in the resulting PDF.

string htmlString = @"<html><head> </head><body> <p style=""page-break-after:always;"">Paragraph before page break</p> <p>paragraph after page break</p> </body></html>";

Converter.ConvertHtmlString(htmlString, "test.pdf");


Thanks,
ceTe Software Support Team.
 Jul 22 2015 6:07 PM
I am actually trying to break on Microsoft.VisualBasic.Constants.vbFormFeed... from a dat file converting to a pdf. Any suggestions here?
 Jul 23 2015 2:24 PM
Posted by a ceTe Software moderator
Hello,

It is not possible to set page breaks for any other file types. The above suggested workaround is only possible for HTML to PDF conversions.

Thanks,
ceTe Software Support Team.
 
 Jul 23 2015 3:47 PM
I ended up looping through the file and creating a page at a time.
This was beneficial because some files had varied lengths for each section and I was able to keep them to a page. I hope it does not cause problems if they end up printing it.
 Jun 08 2016 9:18 AM
Hi

Does DynamicPDF support any of the other page-break css properties when converting html?

for example:

page-break-before: always;
page-break-after: avoid;

Does it support the widows and orphans css?

Does the page-break style need to be inline?


Dallas
 Jun 09 2016 9:24 AM
Posted by a ceTe Software moderator
Hello Dallas,

In order to convert HTML to PDF, the DynamicPDF Converter requires Internet Explorer. Here is the documentation link that lists out all the requirements.

DynamicPDF Converter uses IE to render the HTML and then uses that HTML rendering to create a PDF document. Please make sure that the css tags that you want to use are supported in version of IE that is installed on the machine where the Converter is running.

Thanks,
ceTe Software Support Team.

All times are US Eastern Standard time. The time now is 12:05 AM.