Forum


Replies: 1   Views: 1851
Invoice with subtotals after page break
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-04-2019 - 17:21

Hello,

The third item can be done using DOCXPath (https://www.phpdocx.com/documentation/introduction/docxpath).

If you know how many rows fit each page or there's a pagebreak tag/property to generate new pages, DOCXPath allows inserting/cloning a row (or any other content) after that rows with the new information you need to add; this content can be static or generated from the existing values of table/s. Please note, that a DOCX is not 'painted' as PDF, DOCX contents are displayed when the DOCX is open, so phpdocx don't know when a page break will be (unless you force it); but if you know how many table rows fit a page (because they have fixed heights) then the content after each set of rows (after them a new page will be generated) can be changed easily using DOCXPath.

Although DOCXPath is available in Advanced and Premium licenses, for this kind of task we recommend using a Premium, so DOCXCustomizer can also be used (https://www.phpdocx.com/documentation/introduction/docxcustomizer) if needed. If you purchase a license, please send an e-mail to contact[at]phpdocx.com and we'll generate a script to illustrate how to accomplish that task.

Regards.