Rendering geo map field in PDF

October 12, 2019 14:32:35
cocacool
Topics: 1
Messages: 2
Hi there,

I am tinkering with E2PDF to see if it fits our needs before purchase.
I am working with ACF and have a field in there of the Type OpenStreetMap. It is like a google maps field
but driven by leaflet.js dynamically
When I link it in the PDF it only shows either raw data or the DIV as a rendered string, almost as if the JS does not get triggered.

What causes this behaviour, and is it possible to make it work?

I also tried to do a custom shortcode and registered it in functions.php as dicribed in your forum, but no luck

Suggestions are very much appriciated
October 12, 2019 15:35:44
E2Pdf
Topics: 7
Messages: 3614
Support
Hi,

Unfortunately, to output map inside PDF it must be converted to image (JavaScript in PDFs doesn't work the same way as in "HTML"). Currently E2Pdf can't convert it in "auto" mode. We will check the possibility to extend this functionality, but at this moment the only way is to create custom shortcode which will generate Image Url from your coordinates as "Value" for "E2Pdf" Image Object.

We remain at your service.

We would really appreciate your feedback at WordPress.org!
October 12, 2019 16:31:34
cocacool
Topics: 1
Messages: 2
Hey Oleksandr,

thanks for the quick response.
That's what I thought. Well ok then.

Maybe it can be done giving additional options to image field where you could specify a DIV to be rendered with "html2canvas" https://html2canvas.hertzen.com/
you could specify the DIV of the Map, load it with preset viewport size (image dimensions) and render it to the canvas as PNG in BASE64 to be displayed? or even cached

just an idea
October 12, 2019 16:44:41
E2Pdf
Topics: 7
Messages: 3614
Support
Thank you for the idea. We will check this option.

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.