Forum


Replies: 8   Views: 4203
Add background image for first page
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 wwu_ivv_wiwi  · 03-02-2015 - 10:35

That is a good idea and I am able to create the contents in two separate files, which both look fine for themselves. For the merging I call: $frontfile = tempnam('','wiwi_f_'); $front->createDocx($frontfile); $frontfile .= '.docx'; chmod($frontfile, 0644); $mainfile = tempnam('', 'wiwi_m_'); $docx->createDocx($mainfile); $mainfile .= '.docx'; chmod($mainfile, 0644); $merge = new \Phpdocx\BatchProcessing\MultiMerge(); $merge->mergeDocx($frontfile, array($mainfile), $destination, array('preserveStyleDefaults' => false)); Both front and main files are created and stored in the temporary file system (I checked that and DLed the files). Unfortunately the merging does not work out and ends in the following error: Fatal error: Call to a member function appendChild() on a non-object in [...]/libraries/phpdocx-45/Classes/Phpdocx/BatchProcessing/MultiMerge.inc on line 2059 I can send you the two files to merge if you want to try it for yourself.