Some characters becomes ?? in pdf templates after upgrade

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • novastream
    Member
    • May 2021
    • 67

    Some characters becomes ?? in pdf templates after upgrade

    Hi,

    After upgrading to 9.0.0 (via cli) all special chars in my PDF-templates are displayed as ??.

    They are displayed correctly when editing the template.

    Some chars that are not displayed correctly:
    å ä ö á

    Any ideas whats wrong?
  • ChrisSka83
    Senior Member
    • Apr 2023
    • 212

    #2
    I noticed the same thing today, in my case it's the letter “ß”.
    But after checking, the other German characters don't work either.

    Comment

    • novastream
      Member
      • May 2021
      • 67

      #3
      Originally posted by ChrisSka83
      I noticed the same thing today, in my case it's the letter “ß”.
      But after checking, the other German characters don't work either.
      Hi Chris,

      Think I found what causing the issue, if I remove my logo or any images from the PDF-template the special chars starts working again. Going to test if I need to resave the image or save the image in another format.

      Comment

      • novastream
        Member
        • May 2021
        • 67

        #4
        So the issue seems to be introduced in domPDF 3.0.0 and is still there in 3.01, 3.0.2 and 3.1.0. You can downgrade to domPdf 2.0.8 by defining version in your composer.json file or if you are not using composer you can just download the domPDF 2.0.8 src package and replace it in your vendor directory.

        If doing it manually you should be aware of that you need to replace vendor\dompdf\dompdf and not vendor\dompdf

        Comment

        • ChrisSka83
          Senior Member
          • Apr 2023
          • 212

          #5
          I have now simply replaced the current version with version 2.0.8.
          And... now I have my special characters again.
          Thank you novastream

          Comment

          • yuri
            Member
            • Mar 2014
            • 8552

            #6
            It works fine for me. With an image in a template.

            Maybe using custom fonts?
            If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

            Comment


            • ChrisSka83
              ChrisSka83 commented
              Editing a comment
              I didn't even have a picture in the template.
              I also use this function to print labels and there was only a QR code and text on it.
              Umlauts were always displayed as “??”.
              Texts with ä,ö,ü,ß -> ??

              But with the old version 2.0.8 I don't have these problems.
          • novastream
            Member
            • May 2021
            • 67

            #7
            Originally posted by yuri
            It works fine for me. With an image in a template.

            Maybe using custom fonts?
            I'm using Dejavu Sans and tested a couple of the default fonts without any success. Only time I got it to work where when I removed my company logo. I also installed a fresh version of EspoCRM on my desktop computer and could reproduce the error when created a simple layout with ÅÄÖ and a image.

            Tested all the dompdf versions mentioned above and with 2.0.8 the issue dissapeared.

            Comment

            • novastream
              Member
              • May 2021
              • 67

              #8
              Originally posted by novastream

              I'm using Dejavu Sans and tested a couple of the default fonts without any success. Only time I got it to work where when I removed my company logo. I also installed a fresh version of EspoCRM on my desktop computer and could reproduce the error when created a simple layout with ÅÄÖ and a image.

              Tested all the dompdf versions mentioned above and with 2.0.8 the issue dissapeared.
              I've also attached a minimal example:
              Click image for larger version

Name:	image.png
Views:	0
Size:	41.9 KB
ID:	114162

              And this is the result:
              Click image for larger version

Name:	image.png
Views:	0
Size:	31.3 KB
ID:	114163

              Comment

              Working...