How to limit QR code generation only for frontend page content, not extra HTML code on it

WordPress
6 September, 2021 06:31:54
Alain Melsens
Topics: 8
Messages: 50
Hello,
I want to use the QR Code generation on the PDF forms. This seems to work but in the QR Code there is also a lot of extra HTML code in it.
There are many paragraph symbols <p> and </p> and also a big <iframe name.... </ifame> rule. I don't need all this in the QR Code.
I want to receive a clean QR Code only with the frontend page content data that also appears on the screen as readable data, not extra HTML code on it.
Maybe this can be filtered on some way? But how should it be done?
Thanks in advance.
6 September, 2021 06:37:17
Alain Melsens
Topics: 8
Messages: 50
Hello,
I want to add that I use [e2pdf-wp key="post_content" output="backend"] as value for the QR Code. Maybe this is not the good shortcode to only receive pure page content data, without HTML code in it?
6 September, 2021 07:42:48
E2Pdf
Support
Topics: 7
Messages: 3335
Hi,

You can try to strip_tags by using [e2pdf-format-output] shortcode as:

[e2pdf-format-output filter="strip_tags"][e2pdf-wp key="post_content" output="backend"][/e2pdf-format-output]

We remain at your service.
We would really appreciate your feedback at WordPress.org!
6 September, 2021 07:51:53
Alain Melsens
Topics: 8
Messages: 50
Hi,
Now the QR Code seems to complicated. My QR Code scanner can not read the QR Code anymore. To many dots in the QR Code.
Or can I make it more readable with the Precision and the Quit Zone Size specifications?
6 September, 2021 08:20:15
E2Pdf
Support
Topics: 7
Messages: 3335
QR Codes have limitation of characters number that can be used. Precision must be set to smallest and Quit Zone is highly recommended to have "1" (by default). You can try to increase the size of QR Code placed inside PDF as if the size is too small scanner technically will not be able to recognize data.
We would really appreciate your feedback at WordPress.org!
6 September, 2021 23:09:13
Alain Melsens
Topics: 8
Messages: 50
Hi,
I have made the QR Code bigger but it stays unreadable by my QR Code scanner. In fact I think that the QR Code is holding to many data that I don't need. I have put a screen capture in attachment of the PDF form with the QR Code on it. I only need the pure clean data of the information in the red rectangle. I guess that the output filter "strip_tags" is not working?
6 September, 2021 23:25:09
E2Pdf
Support
Topics: 7
Messages: 3335
Hi,

Your QR Code outputs some encoded information...

It the red rectangle screenshot from rendered PDF? or it's screenshot from post? If it's from rendered PDF, then you must be able just to use same shortcodes under QR Code Value as on screenshot.

QR Code will render value same as it "value" will be set to some temporary "textarea" so we recommend to test with it directly before putting shortcode to QR Code element to see which value you will get.

If the data in red block is part of "post_content" and it's same on all posts, can you please create temporary "textarea", map it with [e2pdf-wp key="post_content" output="backend"], go to "E2Pdf" -> "Export", choose Template and some post, set "Flatten" to "No", export PDF and attach it to next message so we can check if there any possible way to extract only these data.

P.S. You can mark message "private" so only support can see the message.

We remain at your service.

We would really appreciate your feedback at WordPress.org!
7 September, 2021 00:14:23
E2Pdf
Support
Topics: 7
Messages: 3335
Ok, thank you for clarification, it's now more clear. You must keep in mind that maximum "Value" length rendered by QR Code is: 4,296 characters. From your screenshot we can read QR Code but we just noticed that it output base64 encoded image (cutted)...

Can you try to use such value inside created "textarea":

[e2pdf-format-output filter="strip_tags"][e2pdf-wp key="post_content" output="frontend"][/e2pdf-format-output]

or

[e2pdf-format-output filter="strip_tags"][e2pdf-wp key="post_content" output="backend"][/e2pdf-format-output]

Will you see the correct rendered content placed under "textarea" without "HTML"?
We would really appreciate your feedback at WordPress.org!
7 September, 2021 00:20:16
E2Pdf
Support
Topics: 7
Messages: 3335
Ok, thank you for clarification, it's now more clear. You must keep in mind that maximum "Value" length rendered by QR Code is: 4,296 characters. From your screenshot we can read QR Code but we just noticed that it output base64 encoded image (cutted)...

Can you try to use such value inside created "textarea":

[e2pdf-format-output filter="strip_tags"][e2pdf-wp key="post_content" output="frontend"][/e2pdf-format-output]

or

[e2pdf-format-output filter="strip_tags"][e2pdf-wp key="post_content" output="backend"][/e2pdf-format-output]

Will you see the correct rendered content placed under "textarea" without "HTML"?
We would really appreciate your feedback at WordPress.org!
7 September, 2021 00:23:39
E2Pdf
Support
Topics: 7
Messages: 3335
If you still will fail to identify an issue:

Attach to next message or share NexForm + post-to-page addon so we can try to replicate issue on our side.

OR

If it's acceptable for you submit please support ticket with access details to your WP Admin Dashboard so we can try to make tests on your side directly: https://e2pdf.com/support/request.



We would really appreciate your feedback at WordPress.org!
7 September, 2021 00:54:19
E2Pdf
Support
Topics: 7
Messages: 3335
Did you try it with "textarea" and not QR Code?. In case with "textarea" you must see the content which is rendered exactly by shortcode and which data is pulled to QR Code as by some reason your QR Code has encoded image value, instead of content...
We would really appreciate your feedback at WordPress.org!
7 September, 2021 01:04:05
E2Pdf
Support
Topics: 7
Messages: 3335
It looks like we could replicate issue, so we are now trying to identify the problem. We will get back to you as soon as get any news.
We would really appreciate your feedback at WordPress.org!
7 September, 2021 02:21:40
E2Pdf
Support
Topics: 7
Messages: 3335
It was a bug withing using [e2pdf-format-output] shortcode with QRCode and BarCodes, so we currently released RC version (1.16.24) with issue fixed. We are sorry for the inconvenience.

To update plugin to RC version, follow please instruction here: https://e2pdf.com/support/desk/how-to-update-plugin-to-rc-release-candidate-version-from-e2pdf-com or download it directly https://e2pdf.com/download/latest and replace it via FTP.

After update applied, you must be able to use the following shortcode under QRCode Value:

[e2pdf-format-output filter="strip_tags,trim,lines"][e2pdf-wp key="post_content" output="backend"][/e2pdf-format-output]

strip_tags - will remove tags
trim - will remove spaces on top and bottom
lines - will merge multiple lines (which can appear after strip_tags filter) to one new line

P.S. Under "HTML" object you can just use old shortcode to output content to PDF: [e2pdf-wp key="post_content" output="backend"] - as elements independent between each other and can have different shortcodes inside "Value".

Let us know please if issue will be fixed and you will get needed output.
We would really appreciate your feedback at WordPress.org!
7 September, 2021 03:06:41
E2Pdf
Support
Topics: 7
Messages: 3335
Glad to hear that issue resolved. Yes, as alternative you can use any compatible form with E2Pdf https://e2pdf.com/extensions/all. Unfortunately we can't be sure which form is the best for you so the best way is just to test. In most cases we are trying to keep forms compatibly as maximum as we can with their native functionality.

P.S. We added Nex-Forms to our roadmap but we can't guarantee that it will be added or implemented in nearest time, however we will review this possibility.

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