Create PDF Content from some custom forms

WordPress
7 December, 2021 04:24:31
Macelskie
Topics: 1
Messages: 3
I have a question that would like to clarify before buying. I think my concern is probably quite simple to solve. However, I seem to be on the hose.

The situation:
I am using Wordpress together with Elementor and ACF to build a service catalog. Using conditions, empty fields and their description are not displayed.

Now I would like to generate this particular entry as a PDF using E2PDF. Thereby I face the following problem. What would be the best way to proceed?
* If I create each entry as a single field in the template editor, I have the problem that the fields I hide via Condition Empty produce a lot of white space.
* Since my entries are of different lengths, I would have to create the text fields much too large in each case.
* If I insert all fields one after the other into a HTML field, I can't hide the respective label for the custom field via a condition.

I would be very grateful for any tips!
7 December, 2021 04:25:38
Macelskie
Topics: 1
Messages: 3
Note about the photo: There are about 10 more categories that can be filled in. But these are hidden, because they are empty.
7 December, 2021 06:18:55
E2Pdf
Support
Topics: 7
Messages: 3330
Hi,

We are working on adding "inline" conditional logic however we do not have yet ETA when it will be available.

As one of possible solutions you can try to create "HTML" object and fill it dynamically by checking if some ACF field is empty or not and if not, add value to "HTML" object. Screenshot 1 attached.

Instead of [acf field="field1" post_id="[id]"] / [acf field="field2" post_id="[id]"] - you need to use your Field IDs or [e2pdf-wp key="field" meta="true"]. It's one of this possible solutions.

If it will not fit your needs, can you please clarify please about "empty" spaces? Maybe it's possible to add "preg replace" filter or modify output to remove via "filter" however can you please create "textarea" fill it with shortcode and attach it to next message so we can see which source is generated. PDF must not be flattened. You can mark also message as "Private" so only we can see and download PDF.

P.S. If you will need to continue content on next page (if it will not fit in 1st page), you can try to use "Splitting content over pages feature". In this case it must be created "HTML" block on next page where will be set "Parent" to 1st "HTML" object ID and "Hide Page (if empty) option must be checked. Screenshot 2, 3. For next pages it must be same settings.

We remain at your service.
We would really appreciate your feedback at WordPress.org!
8 December, 2021 02:20:17
E2Pdf
Support
Topics: 7
Messages: 3330
Hi,

The current version of NotoSans (which is used by default doesn't contain "→" glyph as the font was changed for maximum language compatibility. You can use standard "Noto Sans" font which is attached in current message.

You need to unzip, go to "E2Pdf" -> "Settings" -> "Fonts" -> "Upload". After this change E2Pdf Template default font to "Noto Sans" (screenshot attached) instead of "Noto Sans Regular". Or use any other font which contains current "glyph".

As about output as: a:1:{i:0;s:13:... - it means that the data stored as array. You must be able to convert it to string by modifying shortcode:

From: [e2pdf-wp key="some_key" meta="true"]
To: [e2pdf-wp key="some_key" meta="true" implode=", "]

We remain at your service.
We would really appreciate your feedback at WordPress.org!