Ziegenpeter: fop übersetzt Sonderzeichen nicht

Hallo Forum!
Ein PDF wird von einer Html-Seite erzeugt. Die Html-Seite (aus Datenbank) zeigt u.a. polnischen Text, dieser wird auch richtig angezeigt. Im PDF jedoch werden alle Sonderzeichen(z.B.:śą,ł) als Hash(#) dargestellt.

Formatiert das fop den Zeichensatz nicht richtig?
Kann man da irgend etwas am fop einstellen? Wenn ja, wie?

kann jemand helfen?

vielen Dank

Peter

  1. Hallo,

    Ein PDF wird von einer Html-Seite erzeugt. Die Html-Seite (aus Datenbank) zeigt u.a. polnischen Text, dieser wird auch richtig angezeigt. Im PDF jedoch werden alle Sonderzeichen(z.B.:śą,ł) als Hash(#) dargestellt.

    Formatiert das fop den Zeichensatz nicht richtig?
    Kann man da irgend etwas am fop einstellen? Wenn ja, wie?

    Da stellen sich Frage:

    Welchen Zeichensatz verwendet die HTML-Seite?
    Wird das PDF mittels XSLT (--> FO --> PDF) erzeugt? Wenn ja: welche Encoding ist im XSL angegeben?
    Verfügt die im/für FOP verwendete Schrift über die entsprechenden polnische Zeichen?

    Ansonsten (z.B. beim eingebetteten FOP oder Servlets: im JavaDoc vom FOP nachsehen, wo man beim TransformerFactory ein Encoding setzen kann bzw. beim Server.response))

    Grüße
    Thomas

  2. 6.2. Some characters are not displayed, or displayed incorrectly, or displayed as “#”.
    ^

    This usually means the selected font doesn't have a glyph for the character.
    Danke für die Antwort Thomas.

    das habe ich hier gefunden:
    http://xmlgraphics.apache.org/fop/faq.html#pdf-characters

    The standard text fonts supplied with Acrobat Reader have mostly glyphs for characters from the ISO Latin 1 character set. For a variety of reasons, even those are not completely guaranteed to work, for example you can't use the fi ligature from the standard serif font. Check the overview for the default PDF fonts.

    If you use your own fonts, the font must have a glyph for the desired character. Furthermore the font must be available on the machine where the PDF is viewed or it must have been embedded in the PDF file. See embedding fonts.

    For most symbols, it is better to select the symbol font explicitely, for example in order to get the symbol for the mathematical empty set, write:

    <fo:inline font-family="Symbol">&#x2205;</fo:inline>

    The "#" shows up if the selected font does not define a glyph for the required character, for example if you try:

    <fo:inline font-family="Helvetica">&#x2205;</fo:inline>

    1. Hallo,

      6.2. Some characters are not displayed, or displayed incorrectly, or displayed as “#”.
      ^

      This usually means the selected font doesn't have a glyph for the character.
      Danke für die Antwort Thomas.

      das habe ich hier gefunden:
      http://xmlgraphics.apache.org/fop/faq.html#pdf-characters

      Ich weiß das, deswegen habe ich ja nachgefragt. ;-)

      Grüße
      Thomas