Posted: June 12, 2019 at 2:34 am
|
Hello, Could you please provide my a quick solution for that, as we are going live soon.
|
Hi there, You’ll likely need the UTF8 template add-on which includes a font that can display non-latin characters. That add-on is available on the pre-release channel, which you can join by following the steps here: https://eventespresso.com/wiki/pre-release-channel-guide/ The docs for the add-on can be found here: https://eventespresso.com/wiki/ee4-utf-8-template-variation-add/ Essentially you download the add-on, activate it, then set the ‘Simple UTF8’ template on the Invoice/Receipts templates in: Event Espresso -> Messages ->Default message Templates -> Receipt / Invoice |
|
|
Yes, I already did it, for I’ve found this solutions on the forum. I downloaded the add-on, installed and launched it. I changed the template to Simple UTF-8, but it did not help. The PDF still has bad encoding characters. |
|
Just to add. The invoice is show correctly on the screen but only the downloaded PDF file has encoding issue. |
Can you link me to an Invoice for a test registration so I can take a look?
That’s expected, its DOMPDF (which we use to generate the PDF’s) that is struggling with the characters, your browser will display them fine as it will have the font’s installed on your system. |
|
|
This reply has been marked as private. |
It looks like we need to update the UTF8 add-on the pre-release channel to include the latest changes for DOMPDF included in core, I’ll get that updated soon. In the meantime, you can use the version HERE. De-activate and delete the current ‘EE4 UTF8 Template Variation’ add-on you have, then install and activate the above. That should load the font correctly in the PDF. |
|
|
Dear Tony, |
Ok, looking at your Invoice I can see its loading the utf8 files however the PDF has no styling applied at all. That’s normally an indication that If you go to Event Espresso -> Maintenance -> System information Search for ‘allow_url_fopen’ what does it show? |
|
|
It shows: global_value 1 |
Ok, can you temporarily enable WP_Debug on the site so I can see if there are any errors? To do that you add the snippet shown here: https://eventespresso.com/wiki/troubleshooting-checklist/#wpdebug To your |
|
|
Done. |
Thank you, but no error captured in relation to the PDFs. Try just using Or, you can use:
Again, errors will be output to that page whilst this is enabled so set it and let me know, I’ll download a PDF and post here so you can disable again, or you can download the PDF and disable again, then send me the PDF if preferred. |
|
|
I turned on the debug. Please try now. |
|
What I can see is: Warning: sprintf(): Too few arguments in /home/rafazje/domains/rozkodujmyafazje.pl/public_html/wp-content/plugins/event-espresso-core-reg/payment_methods/Invoice/EE_PMT_Invoice.pm.php on line 40 |
That’s an issue with a translation and is unlikely to cause this problem. You can switch back to just logging errors now, nothing new output to the screen with the above so no help. Ok, can you edit the Invoice template again and switch to just the ‘Simply’ template, not the UTF8 one, just the normal default style. |
|
|
I’ve switched back to Simple Template Style |
|
Would you be able to help me with the issue by Friday 06/14/2019? |
Thank you, so I’ve used that to confirm you have the same issue on the standard template, so encoding issue aside there’s something on your server preventing the CSS files from being loaded into DOMPDF. I tested the UTF8 add-on my site after switching the language to Polish and downloading a PDF: https://monosnap.com/file/IDsSAd90U6GmIXkQsJ6lY5ridcr7Zl As you can see the non-latin characters are loading correctly there. I ran a few more tests against the files on your site and as mentioned, it does appear that ‘external’ files are being blocked. I ran this from one of my servers:
Which returns: I recommend you contact your host and have them investigate this further, something on your server is blocking the above connections ( |
|
|
Thank you Tony for making the tests. I will try to contact our host provider and ask for switching on file_get_contents() on the server. However, if, due to security reasons, the host will not allow for that, is there any temporary solution I can apply on my WP local installation to get it work? Is there any workaround that you are aware of and would you be able to provide? |
No, there’s no workaround for this. DOMPDF will apparently try to use cURL if You apparently already have allow_url_fopen enabled (which is what If your host is not willing to enable the functions required you’ll need to change hosts. |
|
The support post ‘PDF encoding issue (2)’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.