Converting HTML to PDF PageSize A4

Hello,


i’m evaluating the aspose.pdf .net framework.
During my firsts steps i run into some Problems getting an A4 Page from HTML.

Attached to this post the files i used to try to convert.

To Generate the PDF i use the following code in c#:

HtmlLoadOptions htmloptions = new HtmlLoadOptions(htmlPicPath);
htmloptions.PageInfo.Height = 11.6972;
htmloptions.PageInfo.Width = 8.2672;
htmloptions.PageInfo.IsLandscape = false;

// Load HTML file
Document doc = new Document(htmlFileName, htmloptions);
doc.PageInfo.Width = 8.26 * 72;
doc.PageInfo.Height = 8.26 * 72;
// Save HTML file
doc.Save(saveToFileName);

Thx alot.

Alex

Hi Alex,


Thanks for contacting support.

I
have tested the scenario and I am able to reproduce the same problem that I am unable to set page dimensions for resultant PDF. For the
sake of correction, I have logged it in our issue tracking system as PDFNEWNET-38483. We
will investigate this issue in details and will keep you updated on the status
of a correction. <o:p></o:p>

We apologize for your inconvenience.

Hello,

I have the same problem mentioned in this post. The ticket has been closed? I’m using the latest versions of the library. It should be all right?

Thanks

Hi Alessandro,


Thanks for your interest in Aspose.Pdf. The subjected ticket is not resolved yet. Please note the issue varies from document to document and We will appreciate it if you please share your input/output documents here, so we will look into it and will guide you accordingly.

We are sorry for the inconvenience caused.

Best Regards,