Dynamic background PDF layer

WordPress
22 October, 2021 11:28:29
bryankeithdavis
Topics: 2
Messages: 5
I have individually numbered PDF "Certificates" and am placing the Recipients' names and addresses onto the PDF through meta keys. This is now working perfectly (thanks to your support in the How To area) for a single Certificate that I uploaded into the template. My question is:

Is it possible to dynamically insert/upload a PDF into the template, or must I create a new template for each individual Certificate?
22 October, 2021 11:56:52
E2Pdf
Support
Topics: 7
Messages: 3163
Hi,

Unfortunately changing PDF source dynamically doesn't supported by E2Pdf, however if you need just to change background you can:

1. Create "Image" object and assign image to it.
2. Set "Index" to "-1"
3. Use "Actions" and "Conditions" to change "Image" object "Value" dynamically depending on some input. Inside "if" condition it's possible to use same shortcodes as inside E2Pdf Template. Screenshot 1.

P.S. For easier control you can temporary "hide" background image when you will need to do changes. It can be done via "Right Mouse Click" -> "Hide". To show "hidden" elements you can click on the "Eye" on the toolbar. Screenshot 2. We are working on "lock" function to have easier control on such elements and hope it will be available soon.

We remain at your service.
We would really appreciate your feedback at WordPress.org!
25 October, 2021 11:58:39
bryankeithdavis
Topics: 2
Messages: 5
Thank you for your suggestion. I think I will stick with multiple templates, as the layout of the background changes slightly and my fields need to be adjusted. That is not a problem.

Is there a way to view a pdf if I only know the Title of the Template and not the ID of the Template?
25 October, 2021 22:58:01
E2Pdf
Support
Topics: 7
Messages: 3163
Hi,

Unfortunately no. It must be used ID of E2Pdf Template to define which template must be used.
We would really appreciate your feedback at WordPress.org!
27 October, 2021 10:52:07
bryankeithdavis
Topics: 2
Messages: 5
Thank you for your response.

I solved this by writing a mySQLi SELECT statement to look in the e2pdf_templates table and return the template ID based on the title, which I am getting from another SQL table based on the user.