Free Support Forum -

Page breaks in html to word convert

I'm trying to convert a HTML document containing "page-break-after" styles into a word Document.
Using Aspose Words 15.6.0 the style seems to be ignored.

According to W3C it is supported since CSS 2.1.

Here the code I use:

String base = "issue25/";
LoadOptions loadOptions = new LoadOptions();
Document contentDocument = new Document(base + "data.html"); + "output.docx", SaveFormat.DOCX);

Here is the test example I use:

Is the style not supported, will it be supported in the future?

Nevermind I just found this post:

This does the job:
<br style=page-break-before: always>

Hi Peter,

Thanks for your inquiry. It is great you were able to find what you were looking for. Please let us know any time you have any further queries.

Best regards,