Free Support Forum -

Page-break style for html convert to word document

I am testing your product aspose.word .net.

We thinking of buying it it for a letter generator project.

I am storing HTML in a database to create dynamic letters. but i need to added a page break.

I like to do in HTML How do i add page break to a word document through a HTML style tag.

I have tried:

but does not seem to work.

I am looping though a record set using a stringbuilder to build up the HTML string then I am append it to doc with

html = strbuilder.ToString();



<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. The following HTML line should be inserted as page break:

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

This works fine on my side. Here is code I used for testing:

Document doc = new Document();

DocumentBuilder builder = new DocumentBuilder(doc);

builder.InsertHtml("Bold text on the first page
Italic text on the second page"


I use the latest version of Aspose.Words for testing. You can download it from here:

Best regards.

Thank you, key was pull out the the
out of