Forum


Replies: 3   Views: 86
Space characters removed in createdocxfromtemplate process...

Posted by admin  · 04-12-2024 - 16:49

Hello,

We recommend you read the documentation available at https://www.phpdocx.com/documentation/cookbook/good-practices-with-templates (Parse mode option section).

As explained on this page, if your DOCX contains the template placeholder symbols as regular contents, we recommend enabling the parseMode option:

$docx = new CreateDocxFromTemplate('template.docx', ['parseMode' => true]);

or use ${ } to wrap placeholders.

Please also send your DOCX to contact[at]phpdocx.com and we'll do some tests.

Regards.