Forum


Replies: 2   Views: 2174
Createdocxfromtemplate and start from top of document
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  · 02-04-2019 - 13:53

Hello,

No extra content is added when using an empty template and phpdocx methods (unless you add it explicitly). We think your issue is the following: MS Word always adds an empty paragraph when an empty document is created; so if you use it as a template, the new content is added after the empty paragraph.

You can remove that empty paragraph using removeWordContent from DOCXPath. You can remove the paragraph and generate a new template without it (faster solution), or remove the paragraph each time you use it (slower solution).

Regards.