Forum


Replies: 6   Views: 1337
How to selectively add to multimerge
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 cem  · 30-10-2020 - 19:34

I just tried the second example using merge as needed to try and control the position of the documents using conditional statements.  I get Fatal error: Call to a member function saveDocx() on null.

i'm sure there is something simple i am missing with this. is there a way to simply have conditional statements on each possible document (such as my example), merge as needed and the save that merged doc to the correct path?  I can't seem to pass path parameters to saveDocx() and I'm not seeing any documentation for that.

it seems like you can only do the merge w/o a conditional and the saveDocX() doesn't work with the final merged document.

Also, even just copying the example and testing it gave a lot of errors about zip archive, null, etc.  I don't know if we need to set something in our config/ini but we can't just merge on the fly it seems.  There is always an error unless we use only one merge and then the process is complete - the doc gets created even if other objects were created and attempting to merge.  You can only ever have one mergedocx it seems.

 

Thanks