Hello,
phpdocx users create DOCX with hundreds (and thousands) of pages from huge HTML contents without issues, so this isn't the problem.
Just to test it, we have run the following script:
$html = '
<p><img class="pull-left" src="-valid-url-" alt=""> For each question, you will choose the best answer from the four possible choices. You should answer every question, even if you are just guessing. If you get stuck on a question, you can place a mark in the margin of the test booklet and return to it later. If you decide to change your answer on the answer sheet, make sure you erase the first answer choice completely; failure to do so may result in a wrong answer being identified by the scanner.</p>
<p>During the test, you may write in the test booklet or on scrap paper provided specifically for the test administration. Any paper you use <strong>WILL</strong> be collected by the Proctor prior to your departure from the testing session.</p>
';
$docx->embedHTML($html);
And the output is correct opening it with MS Word 2007 to MS Word 2016 and LibreOffice 6.
Please reply to the topic with the following information:
- The program used to open the DOCX
- php version
- OS
- if you are using LAMP, WAMP, MAMP or any other preset installation, and its version
You can also send to contact[at]phpdocx.com the HTML and DOCX output and we'll check it.
Regards.