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

Free Support Forum - aspose.com

Show page break when save as html?

We are currently evaluating the Aspose.Words product for .NET and are so far very impressed.

What we are doing is taking a Word document, and using this library, converting it to HTML for viewing/editing in an HTML based editor, such as TinyMCE. It would be nice if there would be a way to show page breaks when saving as HTML.

I realize that the concept of a “page break” is not inherent in HTML, however, there is a trick that some editors do, such as TinyMCE. They place a in the HTML. The editor recognizes this and displays an image to represent a page break.

Is there anyway possible to have Aspose.Words optionally output a custom tag where each page break occurs? Or, is there some other trick I can do to accomplish the same thing?


Thanks for your inquiry. Actually, Aspose.Words outputs page breaks to HTML. Page breaks in HTML are represented as the following:

<br style="page-break-before:always; clear:both" />

Hope this helps.
Best regards.

Sounds good!

Now, my other related question is, when having HTML with this tag in it, and using Aspose.Words to convert to a DOC, will it recognize this and create a line break in the resulting DOC file?


Thanks for your inquiry. Yes, Aspose.Words recognizes tag like the following and converts it to page break.

<br style="page-break-before:always; clear:both" />

Best regards,