Ok, I've managed to do this. Another issue is with converting the resulting DOCX to PDF. In the PDF doc each section goes to a new page.
$docx = new CreateDocx();
$html = '<p>1 Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text </p>';
$docx->embedHTML($html, array('useHTMLExtended' => true));
$html = '
<phpdocx_section data-sectionType="continuous" data-paperType="A4" data-numbercols="3" />
<p>2 Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text </p>
';
$docx->embedHTML($html, array('useHTMLExtended' => true));
$html = '
<phpdocx_section data-sectionType="continuous" data-paperType="A4" data-numbercols="1" />
<p>3 Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text </p>
';
$docx->embedHTML($html, array('useHTMLExtended' => true));
$docx->createDocx('test.docx');
$transform = new TransformDocAdvPDF('test.docx');
$transform->transform('test.pdf');
How to get the exact same look in PDF as it is in the DOCX?