I am trying convert an HTML file which contains style attributes to a PDF document using the below java code.
String basePath = “C:\HTML to PDF\”;
HtmlLoadOptions htmloptions = new HtmlLoadOptions(basePath);
// Load HTML file
Document doc = new Document(basePath + “input.html”, htmloptions);
// Save HTML file
doc.save(“c:/HTML to PDF/output.pdf”);
I have attached a zip with the input and output files. And as you can see from the PDF some of its contents are getting squished.
Could you please help me resolve this problem?
Happy to provide any other information you might require.
files.zip (121.2 KB)