Special characters in PDFs

gnsbud
gnsbud
Offline
0
Hi,

PDFs attached to emails doesn't have special characters like Ś ś ł Ł ą Ą ę ć ź ń etc. Insted of them I'm getting question marks. I guess it's something with dompdf, so I already checked this:
define("DOMPDF_UNICODE_ENABLED", true);
define("DOMPDF_DEFAULT_FONT", "Arial");

Arial is supporting these characters and unicode enabled is set to true. What do I have to do to have my special characters in pdf?
Thanks for help.

Best regards,
Chris
Responses (3)
  • Accepted Answer

    Tuesday, September 16 2014, 07:17 PM - #Permalink
    1
    if you need these characters you need to use the only font that has these characers in DOMpdf, which is called "deja vu"

    inside the invoice template, at the top of the code, where the font is defined as Helvetica, change that and put "deja vu" instead. this is the only font that supports all characters in PDF mode.

    Arial file in DOMpdf does not support these... only "deja vu"
    The reply is currently minimized Show
  • Accepted Answer

    gnsbud
    gnsbud
    Offline
    Tuesday, September 16 2014, 07:48 PM - #Permalink
    0
    I made changes as you write, but then while sending email/downloading pdf error occurs:
    "Unable to find a suitable font replacement for: 'deja vu'"
    but I figure it out it's not "deja vu", it's for example "dejavu sans".
    Thanks for the help, everything is fine now.
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, September 16 2014, 08:02 PM - #Permalink
    0
    oh! sorry, yes, yes, you're right, the exact name is "dejavu sans"

    good work!! :)
    The reply is currently minimized Show
Your Reply