Forum


Replies: 4   Views: 1089
Split docx by page
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  · 19-02-2021 - 14:17

Hello,

Internally, DOCX documents work with sections, not pages. A section may fill one or more pages or even less than a page (several sections may fill one page). How many pages have a section is unknown until the DOCX is opened using a DOCX reader (in some cases, distinct DOCX readers may show more or less pages for the same DOCX depending on the contents).

Unfortunately, a DOCX doesn't include a specific tag or content to set a page, only sections. You can do page breaks (addBreak method) and section breaks (addSection method) if needed to separate contents; the previous methods add OOXML tags that can be queried, added, changed, removed...

Regards.