How would we determine or force a page size when converting multiple HTML pages to PDF?
Hi John,
Thanks for contacting support.
In order to set the page dimensions while converting HTML to PDF, please try using the following code snippet.
[C#]
// load source HTML
Document doc = new Document("c:/pdftest/Research+Report.html", new HtmlLoadOptions());
// set destination page size
doc.Pages[1].SetPageSize(400, 400);
// save resultant output as PDF
doc.Save("c:/pdftest/Research+Report.pdf");
Is there anyway to force the PDF conversion to abide by the @page { size:xxx } rule specified in the HTML?
Hi Greg,