Hello,
Yes, using the mergeDocx you can merge from two to any DOCX documents:
$merge = new MultiMerge(); $merge->mergeDocx($document1, array($document2, $document_3, $document_4, $document_5), 'example_merge_docx_2.docx', array());
As you are using a Premium license, you can do it using in-memory documents (without generating in the fs the DOCX to be merged), as the sample from our previous update does. To use in-memory DOCX, you just need to enable the $returnDocxStructure flag:
CreateDocx::$returnDocxStructure = true;
The DOCX is not created but returned when you call the createDocx method:
$document1 = $docx_a->createDocx();
You can generate and keep in variables as many documents as needed to be stored, merged, serialized...
Do not forget to disable the flag after you have finished creating documents:
CreateDocx::$returnDocxStructure = false;
It uses the memory of the server where PHP runs, this is the web server.
Regards.