I've received the samples and am trying to get this to work. I've replaced the class files that you sent.
I have embedded:
<phpdocx_modifypagelayout data-paperType="A4" data-marginTop="850" data-marginRight="1077" data-marginBottom="850" data-marginLeft="1077" />
in the drupal html.html.twig template file, so that this gets added to the page.
I note that the sample includes:
$docx->embedHTML($html, array('useHTMLExtended' => true));
However, as I'm working through the Drupal module, I don't see how I can pass this code. Is there a way to make useHTMLExtended default to true for my entire site?
Again, many thanks for your assistance