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

1 April, 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,
1 April, 2025 08:04:45
E2Pdf
Support
Topics: 7
Messages: 3448
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!