Forum


Replies: 10   Views: 3840
Speed issue
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 admin  · 29-09-2015 - 06:52

Hello, We have checked your scripts. The problem is that each time you replace a variable, phpdocx repairs the template variables to avoid unwanted tags in the placeholders (sometimes Word adds spelling tags when writting the words). To avoid this automatically repairing function, you just need to set the preprocessed parameter as true when you instanciate CreateDocxFromTemplate: $docx = new CreateDocxFromTemplate('templates/Classic 3TAGS VERTICAL LOGO.docx', array('preprocessed' => true)); After doing this minor change, you'll get these output: The file using Corporate Version 5 created 17 docx files in 2.249489068985 seconds The file using Corporate Version 3.3 created 17 docx files in 2.807806968689 seconds As you can see phpdocx 5 is faster than phpdocx 3. Regards.