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. icepdf.log
        3.78 MB
        Tyler Johnson
      3. pdfviewerfontcache.properties
        6 kB
        Tyler Johnson
      1. Ty-output.jpg
        51 kB
      2. User-output.jpg
        101 kB

        Issue Links

          Activity

          Tyler Johnson created issue -
          Tyler Johnson made changes -
          Field Original Value New Value
          Salesforce Case Reference 5007000000TuG3fAAF
          Tyler Johnson made changes -
          Attachment Ty-output.jpg [ 16006 ]
          Tyler Johnson made changes -
          Attachment User-output.jpg [ 16007 ]
          Tyler Johnson made changes -
          Attachment 12197_sample.pdf [ 16008 ]
          Tyler Johnson made changes -
          Attachment pdfviewerfontcache.properties [ 16009 ]
          Tyler Johnson made changes -
          Attachment icepdf.log [ 16010 ]
          Patrick Corless made changes -
          Fix Version/s 5.0.3 [ 11070 ]
          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.
          Patrick Corless made changes -
          Link This issue blocks PDF-599 [ PDF-599 ]
          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.
          Patrick Corless made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #36582 Tue Jul 02 11:22:32 MDT 2013 patrick.corless PDF-596 updated the FontManger to treat the Java lucida fonts as the preferred font over any similarly named system font.
          Files Changed
          Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/pobjects/fonts/FontManager.java
          Hide
          Patrick Corless added a comment -

          Verified using final bundle.

          Show
          Patrick Corless added a comment - Verified using final bundle.
          Patrick Corless made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved: