Forum


Replies: 5   Views: 304
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 - 13:59

Hello,

The firstMatch option works correctly in headers and footers, but it replaces the first occurrence of the placeholder of each header and footer. 

Please note that in MS Word headers/footers work per section, not per page. So if the contents of a section fill more than one page the same header and footer is used. MS Word allows generating new headers and footers per section, not per page, but you can do page section breaks to generate new pages for new sections.

We recommend you to work with as many DOCX documents as needed with their own sections, do the needed changes with phpdocx and then merge the documents into a single DOCX using mergeDocx.

About the firstMatch question, it can be used iterating the values to be replaced. The first match is replaced and the placeholder removed, then the next one and so on.

Regards.