Forum


Replies: 11   Views: 3555
Merge documents
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 MVa  · 11-04-2013 - 12:13

[quote][b]Quote from nicolas on July 18, 2011, 08:51[/b]
Thanks for this patch :)

In an other part, is there a solution for this (last post) : http://www.phpdocx.com/forum?vasthtmlaction=viewtopic&t=55.00 ?[/quote]
This is the only solution i had but it works fine

include_once(’./helpers/phpdocx/classes/CreateDocx.inc’);
$NomDocument = ‘blabla’;
$folder = “”;

$docx = new CreateDocx();
$docx->setEncodeUTF8();
$Template = “doctmp.docx”;
$docx->addTemplate($Template);
$docx->createDocx(’tmpdoc’);

$docx = new CreateDocx();
$docx->setEncodeUTF8();
$docx->addText(’2 DOCX content’);
$docx->createDocx(’doctmp_2’);

$docx = new CreateDocx();
$docx->setEncodeUTF8();
$Template = “doctmp_1.docx”;
$docx->addTemplate($Template);
$docx->createDocx(’tmpdoc_2’);


$docx = new CreateDocx();
$docx->setEncodeUTF8();
$docx->addText(’DOCX content’);
$docx->addDOCX(’tmpdoc.docx’);
$docx->addDOCX(’doctmp_2.docx’);
$docx->addDOCX(’tmpdoc_2.docx’);
$docx->addText(’reDOCX content’);
$docx->createDocx($NomDocument);

In my application I add more than 50 documents made with different template and it work fine and fast

++