Using E2PDF in combination with ACF (Advanced Custom Fields) gallery

WordPress
February 03, 2021 13:27:18
seidelm
Topics: 1
Messages: 3
Hello

I am trying to get images from a ACF into my PDF. I already read that I need to use the "path" parameter to go over the images one by one. But so far I only manage to get the image ID into the PDF. I also used a textarea to print out my images array:

[meta key="boat_images"]
shows:
a:4:{i:0;s:3:"160";i:1;s:3:"162";i:2;s:3:"164";i:3;s:3:"166";}

When I use path like this
[e2pdf-wp key="boat_images" path="0"]
then I get of course the image ID "160" back. But how can I match the image ID with the image URL? Maybe I am doing it totally wrong?
February 03, 2021 14:31:59
E2Pdf
Topics: 7
Messages: 3615
Support
Hi,

You must be able to use one of the following shortcodes to convert image id to image url:

[e2pdf-wp key="boat_images" path="0" attachment_url="true"]

OR

[e2pdf-wp key="boat_images" path="0" attachment_image_url="true" size="full"]

Also if you will need to output is directly as image, it must be used "image" object. Screenshot attached.

We remain at your service.

We would really appreciate your feedback at WordPress.org!
February 03, 2021 20:01:18
seidelm
Topics: 1
Messages: 3
Perfect, thank you for the quick answer. It worked perfectly. My mistake was that I didn't use the image object, but an HTML object instead.

But there is no way that the images build up dynamically in the layout, right? That they have a variable height?
February 04, 2021 06:56:40
E2Pdf
Topics: 7
Messages: 3615
Support
It's possible to use images inside "HTML" object, however it can be some issues as E2Pdf currently doesn't support fully some important tags like wrapping text over image, some style can be rendered incorrectly, etc. We are continuously working on improvements, however it's far away from perfect solution at this moment.

If you still need to use it inside "HTML" object you must be able to use shortcode as , however you must "Disable WYSIWYG Editor" on "HTML" block to have correctly showing typed "HTML" and keep attention on quotes with "src" attribute.

P.S. "Width" also must be set as if not set it will be used original image size.

We remain at your service.

We would really appreciate your feedback at WordPress.org!
February 04, 2021 10:04:27
seidelm
Topics: 1
Messages: 3
Hi Oleksandr

Thanks for the fast reply! I will give it a try if that is a suitable solution for my case, it is good to have that as an optional solution.
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.