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

Free Support Forum - aspose.com

Pdf to Html Support


I am trying to convert pdf to html using aspose trial version. The output is quite good, whereas I was wondering if the extra spaces generated by page breaks could be reduced.

Find attached the documents.

Hello Muzna,

Thanks for using our API.

I have converted your PDF into HTML in our environment and observed the white space between page breaks. Though I have tried to reduce white spaces by editing PDF content before conversion but I did not get much success. For the sake of correction, I have logged an issue as PDFNET-42671 in our issue tracking system. We will further investigate the issue and keep you updated on the status of its resolution.

For your reference, I have tried following code snippet to edit the PDF content before conversion.

Document exportDoc = new Document(dataDir + “Securities Act Of 1933.pdf”);<o:p></o:p>

foreach (Page p in exportDoc.Pages)


p.PageInfo.Margin = new MarginInfo(0, 0, 0, 0);


Aspose.Pdf.Rectangle rect = exportDoc.Pages[1].Rect;

Facades.PdfPageEditor ppe = new Facades.PdfPageEditor();


ppe.Zoom = (float)(rect.Width / rect.Height);

ppe.PageSize = new Aspose.Pdf.PageSize((float)rect.Height, (float)rect.Width);


Please be patient and spare us a little time. We are sorry for the inconvenience.

Best Regards,