Forum


Replies: 5   Views: 2702
How to place different qr-codes to pages in a docx-document?
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  · 06-05-2019 - 11:09

Hello,

You need to use your template to generate as many DOCX documents as needed (for example one document for each page you want in the final DOCX) replacing the image/placeholder by the new QR using replacePlaceholderImage or replaceVariableByWordFragment. And then merge them into a single document using mergeDocx, the numbering option of this method allows continue and restart the numbering.

If the final DOCX has a placeholder that appear more than one time, and it needs to be replaced by unique contents, the firstMatch option available in replace methods can be used.

Regards.