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

Free Support Forum - aspose.com

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:

<div><p><br style="page-break-before:aways; clear:both;"></p></div>

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();

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("<b>Bold text on the first page</b><br style=\"page-break-before:always; clear:both\" /><i>Italic text on the second page</i>");

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