How to send generated PDF via API using Base64 format

Formidable Forms
September 17, 2023 23:54:50
RMI
Topics: 1
Messages: 3
Hi support team,

I have an API integration which i need to send my PDF generated from e2PDF to other system using API from formidable form, but the other end only support Base64, can you let me know if this possible?
September 18, 2023 02:11:37
E2Pdf
Topics: 7
Messages: 3617
Support
Hello,

Unfortunately, there is no default option to output the PDF in base64 yet, but as an option, you can try to use a filter to convert the [e2pdf-download] shortcode output base64 encoded PDF: https://codefile.io/f/9P1tyTyima

Using the shortcode as: [e2pdf-download id="1" output="url" esc_url_raw="true" base64="true"] will return base64 encoded PDF. Please note that if you want to call the shortcode via PHP, you must define the "dataset" attribute, i.e. the ID entry.


We would really appreciate your feedback at WordPress.org!
September 18, 2023 21:04:34
RMI
Topics: 1
Messages: 3
Hi,

Thanks for this! really appreciate your fast response and support.

regards,
September 18, 2023 22:17:45
RMI
Topics: 1
Messages: 3
Hi,

One more question please, are we able to output only the file name of the generated PDF? aside from the base64, i am also need to pass the name of the PDF to our system via API.
September 19, 2023 06:23:24
E2Pdf
Topics: 7
Messages: 3617
Support
Hello,

We have the PHP API development in our TODO list to make it easier to interact, however, not yet any ETA. As a temporary solution, we reviewed your request and released an RC version update which has additional hooks for e2pdf-zapier shortcode, which has needed data. Unfortunately, the current version of E2Pdf doesn't allow easily get the name of the PDF. So to use it:

1. It must be updated the plugin to the latest RC version: https://e2pdf.com/docs/install#rc-version

2. After the update, it must be added PHP hook: https://codefile.io/f/ICEFb5ilun, or you can update it to use it for requests to your API directly, as $data includes also additional information like Entry ID.

If you wish to get needed just via shortcodes and via the provided PHP hook:

[e2pdf-zapier id="1" webhook="local" base64="true"] - will output Base64 PDF

[e2pdf-zapier id="1" webhook="local" base64_name="true"] - will output PDF name

The "dataset" attribute is also required if the shortcodes will be called from PHP.

We would really appreciate your feedback at WordPress.org!
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.