Send an pdf with button

December 21, 2021 07:05:07
ACM
Topics: 9
Messages: 35
I would like to create a button that sends an email to a recipient (s) an attached pdf file created in the e2pdf module.
How should it be?

Thanks
December 21, 2021 08:14:24
E2Pdf
Topics: 7
Messages: 3617
Support
Hi,

If you need to generate PDF attachment for WordPress Page/Post, unfortunately E2Pdf doesn't have such functionality by default.

You can try to create custom functionality with PHP. It can be some custom ajax function which will gather email and post id for which it must be generated PDF. After calling this function it must be called something like this: https://codeshare.io/eVm807. PHP knowledge and further modification will be required to set dynamic Post/Page ID and needed email.

As an alternative you can try to to use for example Formidable Forms which will gather email, and Post ID/Page ID in "hidden" field. Inside Formidable Forms mail action it must be used something like. Mail action can be set to send email to submitted recipients which was filled upon form submission and mail body must contain:

[e2pdf-attachment id="213" dataset="[1461]"]

* 213 - is the E2Pdf Template connected to needed WordPress Post/Page Type.
** [1461] - is the "hidden" field which has default value as [post_id]

P.S. It must be also used any custom text ("Test" in example) in "mail" body as it can be sent empty email.

Some screenshots for 2nd solution attached.

We remain at your service.

We would really appreciate your feedback at WordPress.org!
December 27, 2021 05:35:39
ACM
Topics: 9
Messages: 35
Thanks I have do a function ajax for this thanks
It's work for me
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.