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.
http://www.w3.org/TR/CSS21/page.html#page-breaks
Here the code I use:
String base = "issue25/";
LoadOptions loadOptions = new LoadOptions();
loadOptions.setLoadFormat(LoadFormat.HTML);
Document contentDocument = new Document(base + "data.html");
contentDocument.save(base + "output.docx", SaveFormat.DOCX);
Here is the test example I use:
https://msdn.microsoft.com/en-us/library/ms530842(v=vs.85).aspx
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”>
1 Like
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,