Hello,
HtmlLoadOptions htmlload = new HtmlLoadOptions();<o:p></o:p> htmlload.getPageInfo().setHeight(800); htmlload.getPageInfo().setWidth(600); htmlload.getPageInfo().getMargin().setLeft(10); htmlload.getPageInfo().getMargin().setRight(10); htmlload.getPageInfo().getMargin().setTop(10); htmlload.getPageInfo().getMargin().setBottom(10); Document doc = new Document("c:/pdftest/sample.html", htmlload); //
save resultant PDF doc.save("c:/pdftest/HTMLConversiomn.pdf");
mayekars91:
You need to pass the dimensions values for A4, A0 etc pages to PageInfo object to generate desired output. mayekars91:
Please share your input HTML, so that we can test the scenario in our environment. mayekars91:
Once the PDF file is created, then you may consider following the instructions specified on following link on Adding Text in Header or Footer of PDF File mayekars91: