Integration of specific user information into a PDF via the [e2pdf-view] shortcode

April 01, 2025 07:46:34
BriceM
Topics: 1
Messages: 1
Hello,

I would like to integrate specific user information (in this case, a user with ID 10) into a PDF generated by the e2pdf plugin. The PDF is configured to use user items. Currently, I am using the following shortcode to display the PDF:
[e2pdf-view id="4"]

The URL of the page is as follows:
https://www.example.com/22-2/1/?user_id=10

I would like to know how to configure e2pdf so that the user’s (ID 10) information is automatically retrieved from the URL and included in the generated PDF. Is there a method to link the shortcode to a specific user based on the ID passed in the URL?

Thank you in advance for your help and advice.

Best regards,
April 01, 2025 08:04:45
E2Pdf
Topics: 7
Messages: 3617
Support
Hello,

Unfortunately, there is currently no default way to accomplish this task. However, one possible solution is to use the PHP filter, which will dynamically set the "dataset" (User ID). Please be aware that changing the User ID may expose other users' details.

The code checks if the Template ID is 4 and then parses the User ID from the URL and set as "dataset": https://codefile.io/f/qdEDFGHFu3

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.