Q:
We use PDFNet.dll HTML2PDF to convert web page to PDF file. We have issue to convert the web page.
E.g: When converts the web page, the whole page splits to multiple pdf page.
These are the settings.
HTML2PDF.WebPageSettings wps = new HTML2PDF.WebPageSettings();
wps.SetAllowJavaScript(true);
wps.SetAllowPlugins(true);
wps.SetJavaScriptDelay(5000);
wps.SetLoadImages(true);
wps.SetStopSlowScripts(true);
wps.SetPrintMediaType(true);
wps.SetPrintBackground(true);
wps.SetLoadErrorHandling(HTML2PDF.WebPageSettings.ErrorHandling.e_ignore);
A:
The SetPrintMediaType(TRUE) setting is causing the page breaking of content on this particular page. This setting changes the CSS media type.
Either set this to false to or don’t call.