ICEpdf
  1. ICEpdf
  2. PDF-526

Font substituted with wrong bracket

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.4
    • Fix Version/s: 5.0.1
    • Component/s: Core/Parsing
    • Labels:
      None
    • Environment:
      Linux Red Hat 5.8, Mac 10.6.8
    • Salesforce Case Reference:

      Description

      Detailed analysis of bug provided by user:

      I have a PDF document that contains round brackets in Arial (non-embedded). After I converted the PDF to PNG image, I found that all closing round brackets ")" are replaced with opening brackets "(". For example, 123(4)5 would become 123(4(5.

      Since our system (Linux Red Hat 5.8) does not have the font Arial installed (only installed Arial MT), I turned on the FINEST log and found that ICEPdf used LucidaSans, which is installed in system, for font substitution.

      I found the below log in console:
      FINE: Font Substitution: Found java font: LucidaSans for named font Arial

      I also tested 2 individual PDF documents, both containing only LucidaSans font (one embedded and another non-embedded). I found that the embedded one worked fine while the non-embedded one was having this issue.

        Activity

        Hide
        Patrick Corless added a comment -

        Added a system property org.icepdf.core.font.basefont that changes the base font name from lucidasans which is a Java Physical Font name. The name should be change to one of Java's logical font names:Dialog, DialogInput, Monospaced, Serif, SansSerif. The closest logical name that match LucidaSans is SansSerif.

        The default value is:

        -Dorg.icepdf.core.font.basefont=lucidasans;

        I would recommend using:

        -Dorg.icepdf.core.font.basefont=sansserif

        Show
        Patrick Corless added a comment - Added a system property org.icepdf.core.font.basefont that changes the base font name from lucidasans which is a Java Physical Font name. The name should be change to one of Java's logical font names:Dialog, DialogInput, Monospaced, Serif, SansSerif. The closest logical name that match LucidaSans is SansSerif. The default value is: -Dorg.icepdf.core.font.basefont=lucidasans; I would recommend using: -Dorg.icepdf.core.font.basefont=sansserif
        Hide
        Patrick Corless added a comment -

        I did some testing on a Linux box that didn't have the Arial font and the system property -Dorg.icepdf.core.font.basefont=sansserif addressed the reversed bracket.

        There most be an encoding issue on Linux for the Lucidasans font.

        Show
        Patrick Corless added a comment - I did some testing on a Linux box that didn't have the Arial font and the system property -Dorg.icepdf.core.font.basefont=sansserif addressed the reversed bracket. There most be an encoding issue on Linux for the Lucidasans font.

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Tyler Johnson
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: