Inserting Page Breaks

I am using the following method to convert an HTML file to a MS Word document:


Here is a sample HTML file:

test <p style="page-break-after: always">  test </p><p style="page-break-after: always">  test </p>

When I view the converted MS Word document, the page breaks are missing. If I manually open the HTML file containing the page breaks - using MS Word, the page breaks are present.
Any clues?


Thanks for your request. I managed to reproduce the problem on my side. Your request has been linked to the appropriate issue. You will be notified as soon as it is supported.
As a workaround you can try using the following HTML:

var doc = new Document();
var builder = new DocumentBuilder(doc);
    <br style='page-break-before: always' />
    <br style='page-break-before: always' />");

Hope this helps.

Best regards,

Hi Todd,

Thanks for your inquiry.

I was able to reproduce the issue on my side. We will inform you when a fix is avaliable. In the mean time please try specifying a page break in HTML like this:

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