Forum


Replies: 13   Views: 3229
Add section and change page orientation with htmlextended
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by admin  · 26-05-2019 - 18:50

Hello,

Yes, using PHP namespaces you need to add a use sentence or set the global namespace. For example, in the plugin, you can find the file NodeToDocxHandler.php, where phpdocx is used as:

$docx = new \Phpdocx\Create\CreateDocx();
$docx->embedHTML($html);

as you can check, it's using the global namespace to instantiate the main class: \Phpdocx\Create\CreateDocx . Or you can add a use sentence.

We also recommend you to check if you get any PHP error and if you need to get the raw value of the wordfragment tag in twig to avoid it's escaped.

Regards.