ICEpdf
  1. ICEpdf
  2. PDF-596

Single and double quotes not rendered correctly

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.2
    • Fix Version/s: 5.0.3
    • Component/s: Core/Parsing
    • Labels:
      None
    • Environment:
      Pro, JAI
    • Salesforce Case Reference:

      Description

      The user has a number of fonts installed on their application server and are currently testing to see if they can be correctly converted into an image via ICEpdf. What they're seeing is that single and double quotes in certain fonts cannot be converted. I see different results when viewing this PDF and am likely missing some of the required fonts libraries. For me, the PDF does not render at first and throws the following exceptions:

      FINE: Could not create instance oof font file 0
      java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces
      sorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc
      torAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      at org.icepdf.core.pobjects.fonts.FontFactory.createFontFile(FontFactory.java:2
      09)
      at org.icepdf.core.pobjects.fonts.FontFactory.createFontFile(FontFactory.java:1
      91)

      After switching between pages, the 1st page then appears but only partially renders. Attached are the following:

      1. Sample image of missing single and double quotes on user's machine.
      2. Image output from my test.
      3. Original PDF
      4. User's log file
      5. User's pdfviewerfontcache.properties
      1. 12197_sample.pdf
        274 kB
        Tyler Johnson
      2. pdfviewerfontcache.properties
        6 kB
        Tyler Johnson
      3. icepdf.log
        3.78 MB
        Tyler Johnson
      1. Ty-output.jpg
        51 kB
      2. User-output.jpg
        101 kB

        Issue Links

          Activity

          Hide
          Patrick Corless added a comment -

          Font substitution issue aside we seem to be getting the correct encoding on Windows for all fonts with the OS encoding. I'll need to get a linux environment up and running to test against.

          Show
          Patrick Corless added a comment - Font substitution issue aside we seem to be getting the correct encoding on Windows for all fonts with the OS encoding. I'll need to get a linux environment up and running to test against.
          Hide
          Patrick Corless added a comment -

          This issue is related to PDF-599 and PDF-610. For the double and single quotes, the issue is related to the default lucida font that comes with windows. This font does not contains all the needed Unicode glyphs, in this case \u0094 = " and u0092 = '.

          On Linux all is good as the Java lucida fonts are used which contain the full Unicode range of characters. However on Widows the system font version of lucida used and it doesn't have all the needed glyphs.

          The FontManager needs to be updated to always use the Java Lucida fonts to avoid this issue on windows and potentially other systems.

          Show
          Patrick Corless added a comment - This issue is related to PDF-599 and PDF-610 . For the double and single quotes, the issue is related to the default lucida font that comes with windows. This font does not contains all the needed Unicode glyphs, in this case \u0094 = " and u0092 = '. On Linux all is good as the Java lucida fonts are used which contain the full Unicode range of characters. However on Widows the system font version of lucida used and it doesn't have all the needed glyphs. The FontManager needs to be updated to always use the Java Lucida fonts to avoid this issue on windows and potentially other systems.
          Hide
          Patrick Corless added a comment -

          Updated the the FontManager to load load the Java Lucida fonts after the system fonts have been scanned. This insures that the Java Lucida fonts will be used instead of any found system fonts.

          Show
          Patrick Corless added a comment - Updated the the FontManager to load load the Java Lucida fonts after the system fonts have been scanned. This insures that the Java Lucida fonts will be used instead of any found system fonts.
          Hide
          Patrick Corless added a comment -

          Verified using final bundle.

          Show
          Patrick Corless added a comment - Verified using final bundle.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: