Forum


Replies: 3   Views: 3325
How to duplicate blocks
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  · 13-04-2017 - 10:53

Hello,

UPDATE: cloneBlock method

The cloning method is provided through DOCXPath (https://www.phpdocx.com/documentation/introduction/docxpath). You can find the documentation about cloning contents on:

https://www.phpdocx.com/api-documentation/docx-path/clone-elements-in-docx

All methods included in all licenses of the library work as explained in the documentation pages and are fully tested.

When using an Advanced or Premium license, you have two approaches to accomplish what you need:

· Use DOCXPath to clone blocks or single contents, and replace the placeholders (variables): https://www.phpdocx.com/api-documentation/docx-path/clone-elements-in-docx

· Use a DOCX with the block you need to clone and merge it as many times as needed using the MultiMerge class: https://www.phpdocx.com/api-documentation/docxutilities/merge-Word-documents-with-PHP

Sorry but the only trial available is of the Basic package. Of course, we guarantee all features will work as expected and explained in the documentation and API pages.

Regards.