We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Problem with PDF to HTML conversion when setting output file dimensions


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 http://www.aspose.com/docs/display/pdfnet/PDF+to+HTML+-+Set+Output+File+Dimensions -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,