Forum


Replies: 2   Views: 4172
Call to undefined method createdocx::addtemplate()
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 DMediaBulgaria  · 30-03-2011 - 20:36

Hello,
its nice that you have made this very handy library. I have the following issue:

I just downloaded your free package 2.1, and after trying to replace one variable with the following code:

[code]require_once '../../classes/CreateDocx.inc';

$docx = new CreateDocx();
$docx->addTemplate('example_chart.docx');
$docx->addTemplateVariable('NAME', 'Name Surname Familyname');

$docx->createDocx('example_chart_test.docx');[/code]

It just give me the following error:

[code]Call to undefined method CreateDocx::addTemplate() in /home/***/public_html/***.com/phpdocx/examples/easy/***.php on line 8[/code]

I even coudn't find the method "addTemplate()" anywhere in your code. Maybe you have uploaded the 2.1 version missing this.

Posted by admin  · 11-04-2013 - 12:12

Hi,

Templates are only available using phpdocx pro.

Regards.