This is what I'm trying to do: Take an html document with an image as input and
output a pdf with a specific size.
This is a sketch of my code at the moment:
String pdfPath = "some/path";
String htmlPath = "some/other/path";
String name = "Name_of_File";
HtmlLoadOptions htmlOptions = new HtmlLoadOptions(tempPath);
Document pdf = new Document(htmlPath+File.separator+name, htmlOptions);
Page pdfPage = pdf.getPages().get_Item(1);
pdf.save(pdfPath + File.separator + name + ".pdf");
The result is fine, when I don't specify the size, and the pdf defaults to A4, but
when I specify the size of the pdf, the image is not resized accordingly.
How do I make it so that the image is properly rendered in the correct size
when the pdf is resized?