Accessing Pdf downloaded link in backend

Gravity Forms
20 April, 2023 04:39:20
cvla
Topics: 6
Messages: 22
1. Is it possible to get e2pdf generated download link after the gravity form submission in backend file like function.php?
So that we can insert the link in post meta
2. The download link generated after form submission a permalink to that specific pdf or will it expire after some time.
20 April, 2023 04:56:47
E2Pdf
Support
Topics: 7
Messages: 3163
Hi,

1. It's possible to get generated PDF download button/link, but it requires knowing the Gravity Forms Entry ID.

Example shortcodes:

$pdf = do_shortcode('[e2pdf-download id="1" dataset="' . $entry_id . '"]');

$pdf = do_shortcode('[e2pdf-download id="1" dataset="' . $entry_id . '" output="url"]');

$pdf = do_shortcode('[e2pdf-download id="1" dataset="' . $entry_id . '" output="url" esc_url_raw="true"]');

* where $entry_id - must be valid Gravity Forms Entry ID.

2. Created link is connected to the Gravity Forms Entry, so it will be valid until Gravity Forms Entry ID exists as E2Pdf generates PDFs in real-time. If Gravity Form Entry will be removed - the PDF download link will fail with a 404 error message.
We would really appreciate your feedback at WordPress.org!
10 May, 2023 22:47:33
cvla
Topics: 6
Messages: 22
It worked! Thankyou.