How to duplicate entire page or duplicate field with all its actions into another page

WordPress
January 11, 2023 08:31:21
natacha
Topics: 2
Messages: 8
I am building PDF pages with complex layouts that are controlled by ACF field values. As a result each field has a lot of actions and takes a long time to set up. I now need to duplicate each page 20 times.

Is there a way to either:
A) duplicate the page, keeping all the fields and actions with these, or
B) duplicate a field into another page?

Any other tips or tricks to achieve this?
Otherwise it is going to take me a long time to set up the full document :(
January 11, 2023 08:39:34
natacha
Topics: 2
Messages: 8
THe reason I need this is that I have an 'Artworks' ACF repeater and I am printing each artwork image and details to separate PDF pages.

Another way I was thinking of generating the document is looping through the repeater and calling the shortcode [e2pdf-save id="1" dataset="1"] to generate each PDF page individually. THat way I don't have to repeat the page setup 20 times.

Do you think this would work? I am wondering if there would be an issue with timeouts if the pdf does not have the time to generate before looping.
January 11, 2023 08:47:12
natacha
Topics: 2
Messages: 8
I just found another Help post where you explain how to 'Copy' and 'Paste in Place' - your plugin is amazing!

I would still like to know if generating the PDF pages individualy via a PHP function is possible as this would save a lot of time.

If you have any advice on that I would be grateful. Thank you!
January 11, 2023 08:48:03
E2Pdf
Topics: 7
Messages: 3617
Support
Hi,

You must be able to accomplish the task:

- Create a new page
- Select all needed created fields with the mouse as you do usually with files
- Right Mouse Click on any selected field -> "Copy". All fields must remain selected.
- Right Mouse Click on the newly created page free space -> "Paste In Place" or "Paste"

Using [e2pdf-save id="1" dataset="1"] shortcode also as an option, however, keep in mind that it must be set dynamically generated unique "name" attribute for each shortcode run to avoid E2Pdf overwrite the files.

We remain at your service.

We would really appreciate your feedback at WordPress.org!
January 11, 2023 08:52:50
E2Pdf
Topics: 7
Messages: 3617
Support
P.S. If you plan to call [e2pdf-save] shortcode from PHP it must look like this:

for ($i = 1; $i <= 10; $i++) {
do_shortcode('[e2pdf-save id="1" dataset="1" name="' . $i . '" apply="true"]');
}

"dataset" - must be the correct Post ID, or Page ID depending on your E2Pdf Template connection.

also, keep attention to your PHP max execution time setting, as PDFs will be generated 1 by 1 until completed to not exceed the time limit.

We would really appreciate your feedback at WordPress.org!
January 11, 2023 09:05:38
natacha
Topics: 2
Messages: 8
Thank you for this information - it is very very useful! Thank you!
Get News and Updates
Our monthly newsletter keeps you in the loop, so you'll always be up to date with the latest news and updates about E2Pdf.
* You can update your email subscription preferences here.
All trademarks, service marks, trade names, product names, and logos appearing on this website are the property of their respective owners. The use of trademarks such as Formidable Forms®, Forminator Forms®, Gravity Forms®, JetFormBuilder®, WordPress®, WooCommerce®, WPForms® and others is solely for identification purposes (nominative use) and does not imply any affiliation, sponsorship, or endorsement by the respective trademark holders.
© 2017 - 2026, https://e2pdf.com

We use cookies to collect and analyse information on site performance and usage, to provide social media features and to enhance and customise content and advertisements. By clicking "Accept Selected", you consent to use of selected cookies according to our Cookie Policy.