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.
Hi,
I'm currently testing the trial version and I'm looking for a way to achieve the following: I have a template page containing several variables (mostly a title, a table and an image). I need to insert several times this template page and then, for each page, replacing the variables according to my data (e.g.: first page get "Title 1", the table get the "data1" dataset and the image is replaced by "Image1.jpg"; then second page get "Title 2", ...)
I don't want to generate the title, table and image (by using addText, addTable, ...) since there are other things around that do not need to be modified and it will become to complex (I need to be able to modify the template without recoding everything)
Is there a simple way to achieve that (other than using $docx->addExternalFile several times to create the pages I need, saving it to a new .docx and then reopening it as a template in order to replace the variables) ?
I hope I was clear enough, not really easy to explain.
Thank you in advance for your answer !
Hi,
Corporate and Enterprise licenses have a MultiMerge class to merge DOCX/PDF files. So it's the best choice to do what you need.
Regards.
Thanks for the answer.
So with the Multimerge, you can merge several docx as a unique template and then replace the variables (each of them coming from the individual documents) ?
Hello,
Yes, you can merge DOCX files as a unique template and replace the variables.
Regards.
Thanks for the info !
I suppose this feature cannot be tested in the demo version ...
Hello,
Sorry but there's no demo available for Corporate and Enterprise licenses.
Regards.