Get at querystring value above iframe

May 11, 2022 05:05:31
bbynes
Topics: 2
Messages: 4
Hi.

I have placed my own shortcode in my template. In that shortcode, I want to get at the querystring. But with e2pdf-view, it's creating an iframe. So I can't access the querystring. I tried a shortcode on the page I previously was using [e2pdf-view] and in that shortcode tried returning [e2pdf-view] with do_shortcode. Nothing displays.

Is there a better way to get at the querystring?
Is there a way I can use do_shortcode inside my own shortcode?

return do_shortcode( '[e2pdf-view id="2" responsive="true" hide="presentation,openfile"]');
Keep in mind, this shortcode works for me on it's own on the page, just not from inside another shortcode.

Thanks!
May 11, 2022 05:20:40
E2Pdf
Topics: 7
Messages: 3617
Support
Hi,

By default E2Pdf can't render $_GET or $_POST parameters inside PDF however it must be possible to accomplish the task with arg1, arg2, arg3 attributes by which you can send data to PDF via do_shortcode: https://e2pdf.com/support/docs#shortcode-e2pdf-view

The reason why do_shortcode doesn't work - it's required "dataset" to be defined so E2Pdf can know for which Page / Post / Entry it must be created PDF. So if E2Pdf Template connected to "Pages" - datasetsmust be Page ID, if to Custom Post Type - it must be the ID of some Custom Post Type. So the correct usage will be something like this: https://codeshare.io/wnYnK9

Inside E2Pdf Template you will need to use [e2pdf-arg key="arg1"] / [e2pdf-arg key="arg2"] to output data from arguments also keep attention to remove dbl quotes from string which must be rendered as via "arg" attributes.

We would really appreciate your feedback at WordPress.org!
May 19, 2022 08:17:46
bbynes
Topics: 2
Messages: 4
I wanted to get back to you that this worked well. Great support! Thanks.
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.