Support

Home Forums Pre-Releases Invoice UTF8 template doesn't work

Invoice UTF8 template doesn't work

Posted: January 23, 2017 at 9:21 am


2silda

January 23, 2017 at 9:21 am

Hi,
I have one thing I want to get help with.
1. Even if Simple UTF8 template style is enabled, it still generates PDF invoices with bad characters. I want to show properly Estonian letters on PDF invoice like ä,õ,ö and ü.

MySQL database has right encoding.

What to do, my other support topic has not been answered for more than 20 days.


Josh

  • Support Staff

January 23, 2017 at 9:57 am

Can you check the PHP info for your server and verify that Multibyte Support (mbstring) is enabled?

https://www.evernote.com/shard/s4/sh/8d441a3f-bd86-4bf6-8292-2916d5d8d729/9921b12f10ba9bc30d0db54baf748545


2silda

January 23, 2017 at 10:03 am

Yes, it is enabled.


Josh

  • Support Staff

January 23, 2017 at 1:11 pm

OK, can you try making an edit to the event-espresso-core-reg/core/libraries/messages/messenger/EE_Pdf_messenger.class.php file?

On line 353, it has this:

$dompdf->load_html($content);

You can change that to:

$dompdf->load_html( utf8_decode($content) );


2silda

January 23, 2017 at 1:16 pm

Thank you Josh, it shows me now Estonian letters, but it has problem with € sign. € is showed as ? in the PDF.


Josh

  • Support Staff

January 23, 2017 at 2:38 pm

Hi there,

Are there any other plugins activated on your WordPress site that use the DOMPDF library?


2silda

January 23, 2017 at 3:03 pm

Hi,
none that I aware of.


Josh

  • Support Staff

January 23, 2017 at 3:46 pm

In that case, can you change the code on line 353 back (remove the edit), then generate the PDF invoice will all other WordPress plugins deactivated?


2silda

January 24, 2017 at 12:48 am

I figured it out the € sign by myself. Googled the DOMPDF and euro sign and figured out if I use it with HTML code it will be fine. So I went to Countries settings, edited my country symbol to € instead of € and saved settings. After that € appeared in Countries settings and PDF.

So the thing is not another plugins but things how DOMPDF works.


2silda

January 24, 2017 at 12:49 am

By editing I meant € =


2silda

January 24, 2017 at 12:50 am

As the code automatically transforms the sign, I pasted € sign in HTML here – http://pastebin.com/v9vGagbM


Josh

  • Support Staff

January 24, 2017 at 8:45 am

What you concluded about DOMPDF isn’t necessarily correct. The DOMPDF library that’s bundled with Event Espresso makes the correction for the euro symbol. However, if you have another plugin that also loads in the DOMPDF library, then the DOMPDF library that’s bundled with Event Espresso will not load.

The support post ‘Invoice UTF8 template doesn't work’ 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.

Beta test upcoming software through the pre-release channel. Learn more about the pre-release channel.

Status: closed

Updated by  Josh 3 years, 6 months ago ago

Topic Tags

Tagged: ,

Notifications

This topic is: not resolved
Do NOT follow this link or you will be banned from the site!