HTML String to pdf

November 06, 2020 16:42:16
QuietGamer
Topics: 3
Messages: 3
Hi, there,

I need convert an HTML string in PHP code into pdf and allow user to view it as it is rendered in browser. What is the best way to do it?

The string is simply a table and user data in the table.

Thank you!
November 06, 2020 18:54:12
E2Pdf
Topics: 7
Messages: 3617
Support
Hi,

You can try to use "e2pdf_model_shortcode_e2pdf_user_response" filter which must be added to your themes functions.php to output custom data.

Example: https://codeshare.io/aneJBY

Shortcode inside E2Pdf Template will be like:
[e2pdf-user id="current" key="custom_output"]

It will output "test" if key in shortcode set as "custom_output"

Let us know please if such solution can work for you.

We remain at your service.

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.