When writing an application to convert HTML documents to PDF documents on the server side, my HTML document gets resized and becomes weirdly formatted. The before and after conversion is depicted below. I believe its because the original HTML page is much larger than the resulting PDF, causing some formatting issues when it is squished. Is there a way I can resize the HTML page before it is added to the PDF so that this does not happen? Or does anyone have any ideas about what is causing this in the first place?
It is not a problem with importing the HTML file itself, as importing to HTML and exporting back to HTML leaves a near identical result.
Thank you for your help.