Problem with PDF to HTML conversion when setting output file dimensions

Hi,

I’m converting PDFs to HTML using Aspose.PDF. This works fine when I’m not setting output file dimensions for HTML but I need to do that.

I’ve used code from Convert PDF to HTML in .NET|Aspose.PDF for .NET -page for conversion but result HTML doesn’t match to original PDF. Instead HTML content is cut from top and right side… See attached HTML-result file.

I also attached original PDF-file and code I’ve used for conversion.

Could you check if I there is something that could be done to make this conversion work when output file dimensions are set?

Thanks in advance.

Hi Juuso,


Thanks for your inquiry. Please note the Pagesize parameters in the code specified in the documentation are for a portrait Page layout. You may change it to as per your need, e.g I have swapped the width with height and it is more readable/similar to PDF.

float newPageWidth = 849f;<o:p></o:p>

float newPageHeight = 600f;

....


Please feel free to contact us for any further assistance.


Best Regards,