E2pdf REST API Support

Gravity Forms
23 November, 2019 18:19:25
wakadala
Topics: 8
Messages: 20
Hello e2pdf support,

I have built a system in angular in which I display gravity entries and also submit them into gravity forms through REST API. While getting records, we'd like to access a PDF link or PDFs in the application through the API for each entry received. As of now we are able to receive entries from gravity forms but we don't know how to get the PDF URL using e2pdf. This app is due to go live by Monday, it will be so very helpful if there's a work around. Thank you!

Philip.
23 November, 2019 19:09:26
E2Pdf
Support
Topics: 7
Messages: 3330
Hi,

E2Pdf generating PDF links by firing shortcode [e2pdf-download], so actually to generate link it must be enough to use this code with needed attributes:

$link = do_shortcode('[e2pdf-download id="1" dataset="2" output="url"]');

Where:
id="1" - is your E2Pdf Template ID which must be connected to Gravity Form
dataset="2" - is Gravity Forms Entry ID
output="url" - will define to output just url without any html

We remain at your service.
We would really appreciate your feedback at WordPress.org!
23 November, 2019 19:18:13
wakadala
Topics: 8
Messages: 20
Thanks so much for the reply. I'm creating the application in Angular and calling content via REST API. Angular is in JavaScript and not php. There's actually no way to process the short code. If there's a workaround processing short codes outside WordPress installation, that'd be awesome but if its outside the scope of your support, I can understand. Thank you so much!!

Philip.
23 November, 2019 19:24:24
E2Pdf
Support
Topics: 7
Messages: 3330
Unfortunately it's not possible. E2Pdf and our API was designed exactly to be used with WordPress directly. We have in plans to create and open our PDF API in future for 3rd party software and developers but it's not in nearest time.

We remain at your service.
We would really appreciate your feedback at WordPress.org!