Forum


Replies: 2   Views: 3729
Call to undefined method createdocx::importsinglenumbering()
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 garethellis36  · 23-01-2014 - 14:16

Hi



I'm using the community version and am trying to create a fairly basic word doc. I get this error message:



Call to undefined method CreateDocx::importSingleNumbering() 



Here is my code:



        require_once(ROOT . DS . 'vendors/phpdocx/classes/CreateDocx.inc');



        $template = ROOT . DS . 'vendors/phpdocx/templates/phpdocxBaseTemplate.docx';

        $tmp_dir = ROOT . DS . 'app' . DS . 'tmp';



        $docx = new CreateDocx($template, $tmp_dir);


Posted by garethellis36  · 23-01-2014 - 14:40

I worked this out - it was because I was passing a non-default template name as first argument. I found another forum page saying you could set temp dir in second argument, but I guess that's an old version of the class because you can't in this version. I found where to set the temp dir in the config INI file.