'HTML to DOCX using library PHPWORD

I am using PHPWORD library to generate the docx file from dynamic HTML by using the command

\PhpOffice\PhpWord\Shared\Html::addHtml($section, $html, false, false);

But I am not sure how to apply the page break. In my dynamic HTML code I have used the HTML tag <br style="page-break-after: always;" /> but it is not working. How can I do that?

Link to PHPWORD library.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source