Replies: 1   Views: 3555
Adddocx changes template site and formating
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 jwiseman  · 01-03-2012 - 04:01

When creating envelopes via this process, my envelopes create fine individually. But when I merge them together, I lose the formatting and the size of the templates. Is there a better way to do this or is this a bug?

require_once 'Phpdocx/classes/';

foreach($data as $key => $value){

$docx = new CreateDocx();

$docx->addTemplateVariable('RETURN_NAME', $value);

$docx->addTemplateVariable('SENDER_NAME', $value);
$docx->createDocx('envelope_merge_' . $key);

$docx = new CreateDocx();
foreach($data as $key => $value){
$docx->addDOCX('envelope_merge_' . $key . '.docx');