While converting .docx to HTML- HTML view does not show Page Break

I am using Aspose.Word (version 5.2.2.0) with license. I am converting 2007 .docx word content to HTML using (document.Save(ddd,saveformat.HTML):wink: This is to produce an HTML preview in the web application before publishing the content in PDF.

In almost all the cases, the HTML is the same as that given in the .docx content. But when there is Page Break inserted in to the word content, then the HTML preview doesn’t render this Page Break. It renders as a single page. This makes the HTML preview different from the content.

Could you please suggest a resolution to this issue as the we need to have an exact preview in HTML for the word content that we give.

Hi

Thanks for your inquiry. Note that it is impossible to get output HTML 100% exact to the original MS Word document. Html document has only one page so page break can’t be rendered in HTML. You will see the same behavior when convert doc to HTML using MS Word.

Best regards.

I see that this got added to my page breaks… This would give the HTML printer friendly page breaks

Hello!

I would like to clarify this case. Aspose.Words does output page breaks as you noted. But when your document is viewed in browsers page breaks are shown as additional spacing between lines or empty paragraphs. They are intended for printing. So rendering application should be sensitive to these page breaks and show paginated content to make adequate preview.

Regards,