Umlaut (Special Char) in PDF Template

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • barbara_4fb
    Junior Member
    • Jul 2021
    • 8

    Umlaut (Special Char) in PDF Template

    I have a problem with a pdf template. As I am based in Germany my data contains special "umlaut" chars such as ä, ü, ö, ß
    When those chars are used within a value they are interpreted fine in the pdf. So I think the font is able to show them.

    However my Labels or intro text passages of the PDF document don't get interpreted correctly.

    Example (Label: Value)

    Organisation: Caritas Münster
    Träger: Caritas

    I tried to change the label text in html view into Träger, but whenever I save, the editor changes it back to "Träger".

    Any idea what I can do?
  • rabii
    Active Community Member
    • Jun 2016
    • 1245

    #2
    try to use a font that support these caracters. e.g in the code editor wrap the label in a span tag and use style to specify the font. AFAK the fonts on pdf should support this like Helvtica and Times. here is a code i tested below and works fine

    PHP Code:
    <p><br>
    <span style="font-family: Helvetica;">Label Träger : </span> &nbsp; Caritas Münster
    </p>

    Also remember to set a proper font on the pdf template record.
    Rabii
    Web Dev

    Comment

    • barbara_4fb
      Junior Member
      • Jul 2021
      • 8

      #3
      That's how your Code looks within my document:
      Click image for larger version

Name:	image.png
Views:	54
Size:	6.2 KB
ID:	112616

      The Font supports "umlauts" as long as they are within the value of a field. Just not within spans

      Comment

      • rabii
        Active Community Member
        • Jun 2016
        • 1245

        #4
        which version you are using ? here is how it looks in my instance (version 8.4)
        Attached Files
        Rabii
        Web Dev

        Comment

        • barbara_4fb
          Junior Member
          • Jul 2021
          • 8

          #5
          We are still in 8.3 - so maybe an update will solve the problem

          Comment

          • shalmaxb
            Senior Member
            • Mar 2015
            • 1592

            #6
            look at your PDF engine as well (it is in Administrator -> Einstellungen).
            For me that worked from early versions already. I use Font DejaVue.

            Comment

            • barbara_4fb
              Junior Member
              • Jul 2021
              • 8

              #7
              By chance and some debugging I just found out the problem:

              I have an iteration through some linked Entitys.
              If I use

              <tr iterate="{{cVerificationPersons}}"><td>{{lastName} }</td><td>{{firstName}}</td><td>{{dateofbirth}}</td><td>{{birthAdressCity}}</td><td>{{birthAdressCountry}}</td><td><br></td>
              </tr>​
              I get the errors. At another document I used another script instead:

              {{#each cVerificationPersons}}
              {{lastName}} {{firstName}} {{dateofbirth}} {{birthAdressCity}} {{birthAdressCountry}}
              {{/each}}

              This works perfectly fine.​

              Comment


              • item
                item commented
                Editing a comment
                You have just found a little issue then.. maybe post to "bug" section ?
                The "iterate" was introduced recently... but i continue use {{#each..}} so i can't look into because i don't know "iterate"
            Working...