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.
hello.
i have tried to show text dynamically and image also dynamically in same doc but when i use TemplateTableImage template so only images are show whether i have included variable and i also make my template its show varible values but not images whether i copy all text of TemplateTableImage template. plz solve my problem its very urgent
Hello,
Please paste your code.
Regards.
require_once '../../classes/CreateDocx.inc';
$docx = new CreateDocx();
$docx->addTemplate('../files/TemplateTableImage.docx');
//$docx->addTemplateVariable('NAME', $_POST['Txtname']);
$docx->addTemplateVariable('EMAIL', 'sonal');
$docx->addTemplateVariable('HELLO', 'Hellooooooooooo');
//$docx->addTemplateImage('IMAGE1', '../files/img/image_2.jpg');
$docx->addTemplateImage('IMAGE2', '../files/img/image_2.jpg');
$docx->addTemplateImage('IMAGE3', '../files/img/image_2.jpg');
$docx->createDocx('../docx/test13');
but whether i paste $EMAIL$, $HELLO$ in template images are not generate.
Hello,
Please upload your DOCX template too.
Regards.
i used default template of examples of phpdocx.
please follow below path -
phpdocx_pro/examples/files/TemplateTableImage.docx
hi,
i just want to ask you - can i generate doc of text and images simultaneously.i used example templateImage.php but its not works.
please help me asap
Hello,
All examples are working fine, pleaase check your code and phpdocx/server log . About these lines:
$docx->addTemplateVariable(’EMAIL’, ’sonal’);
$docx->addTemplateVariable(’HELLO’, ‘Hellooooooooooo’);
You can't replace a variable if the placeholder doesn't exist in template. And the included example doesn't have EMAIL, HELLO placeholders; you must add them to template before replacing them.
i have add EMAIL AND HELLO variable in my template, but after adding these variable my images are not seen, why ?.
and 1 more question -
i used replaceTemplateVariableByHTML for solve same problem but in where i include image path in coding.plz help me.
Hello,
Please share your document to test it.
Regards.