ICEpdf
  1. ICEpdf
  2. PDF-656

InvocationTargetException - Could not load font dictionary class

    Details

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

      Description

      When rendering a provided PDF file the following error strack trace is thrown and the PDF is rendered with mixed up characters. According to the customer the file uses built in CID fonts with Identity-H encoding:

      FINE: Could not load font dictionary class
      java.lang.reflect.InvocationTargetException
      at sun.reflect.GeneratedConstructorAccessor2.newInstance(Unknown Source)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
      at org.icepdf.core.pobjects.fonts.FontFactory.getFont(FontFactory.java:126)
      at org.icepdf.core.util.Parser.getObject(Parser.java:411)
      at org.icepdf.core.util.LazyObjectLoader.loadObject(LazyObjectLoader.java:73)
      at org.icepdf.core.util.Library.getObject(Library.java:156)
      at org.icepdf.core.util.Library.getObject(Library.java:206)
      at org.icepdf.core.pobjects.fonts.nfont.Font.init(Unknown Source)
      at org.icepdf.core.pobjects.fonts.nfont.Font.init(Unknown Source)
      at org.icepdf.core.pobjects.Resources.getFont(Resources.java:150)
      at org.icepdf.core.util.content.AbstractContentParser.consume_Tf(AbstractContentParser.java:722)
      at org.icepdf.core.util.content.NContentParser.parseText(Unknown Source)
      at org.icepdf.core.util.content.NContentParser.parse(Unknown Source)
      at org.icepdf.core.pobjects.Page.init(Page.java:368)
      at org.icepdf.ri.common.views.PageViewComponentImpl$PageInitializer.run(PageViewComponentImpl.java:1039)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:722)
      Caused by: java.lang.NullPointerException
      at org.icepdf.core.pobjects.fonts.Font.<init>(Font.java:195)
      at org.icepdf.core.pobjects.fonts.nfont.Font.<init>(Unknown Source)
      ... 19 more

        Activity

        Patrick Corless made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #38237 Thu Sep 19 14:50:50 MDT 2013 patrick.corless PDF-656 updated the parse to do a quick check for a fontDescriptor key before creating a font just encase we actually have a fonDescriptor
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/util/Parser.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #38236 Thu Sep 19 14:50:30 MDT 2013 patrick.corless PDF-656 updated the parse to do a quick check for a fontDescriptor key before creating a font just encase we actually have a fonDescriptor
        Files Changed
        Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/pobjects/fonts/FontDescriptor.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #38235 Thu Sep 19 14:46:43 MDT 2013 patrick.corless PDF-656 updated the parse to do a quick check for a fontDescriptor key before creating a font just encase we actually have a fonDescriptor
        Files Changed
        Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/util/Parser.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #38234 Thu Sep 19 14:46:27 MDT 2013 patrick.corless PDF-656 updated the parse to do a quick check for a fontDescriptor key before creating a font just encase we actually have a fonDescriptor
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/fonts/FontDescriptor.java
        Patrick Corless made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 5.0.4 [ 11072 ]
        Resolution Fixed [ 1 ]
        Hide
        Patrick Corless added a comment -

        Tweaked the parser to sniff out the fontDescriptor even with the type=font. Fix has been added to trunk and branch.

        Show
        Patrick Corless added a comment - Tweaked the parser to sniff out the fontDescriptor even with the type=font. Fix has been added to trunk and branch.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #38231 Thu Sep 19 13:53:11 MDT 2013 patrick.corless PDF-656 updated the parse to do a quick check for a fontDescriptor key before creating a font just encase we actually have a fonDescriptor
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/util/Parser.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #38230 Thu Sep 19 13:50:59 MDT 2013 patrick.corless PDF-656 updated the parse to do a quick check for a fontDescriptor key before creating a font just encase we actually have a fonDescriptor
        Files Changed
        Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/util/Parser.java
        Hide
        Patrick Corless added a comment -

        The issue with this PDF is the that a font's fontDescriptor has a dictionary type entry that specifies it as a "font" instead of "fontDescriptor". As a result our Font class chokes when trying to initialize a fontDescriptor as a font.

        Show
        Patrick Corless added a comment - The issue with this PDF is the that a font's fontDescriptor has a dictionary type entry that specifies it as a "font" instead of "fontDescriptor". As a result our Font class chokes when trying to initialize a fontDescriptor as a font.
        Arran Mccullough made changes -
        Field Original Value New Value
        Salesforce Case Reference 5007000000W5E4AAAV
        Arran Mccullough created issue -

          People

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

            Dates

            • Created:
              Updated:
              Resolved: