ICEpdf
  1. ICEpdf
  2. PDF-565

InvocationTargetException - Could not create instance oof font file 0

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0
    • Fix Version/s: 5.0.1
    • Component/s: Font Engine
    • Labels:
      None
    • Environment:
      All
    • Salesforce Case Reference:

      Description

      When displaying a pdf the following error is thrown and the Fonts are not rendered correctly:

      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(NativeConstructorAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      at org.icepdf.core.pobjects.fonts.FontFactory.createFontFile(FontFactory.java:151)
      at org.icepdf.core.pobjects.fonts.FontDescriptor.init(FontDescriptor.java:292)
      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:146)
      at org.icepdf.core.util.content.AbstractContentParser.consume_Tf(AbstractContentParser.java:719)
      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:363)
      at org.icepdf.ri.common.views.PageViewComponentImpl$PageInitializer.run(PageViewComponentImpl.java:1008)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:662)
      Caused by: java.lang.IllegalStateException
      at org.icepdf.core.pobjects.fonts.nfont.NFontTrueType.readMetricsTables(Unknown Source)
      at org.icepdf.core.pobjects.fonts.nfont.NFontTrueType.parse(Unknown Source)
      at org.icepdf.core.pobjects.fonts.nfont.i.<init>(Unknown Source)
      at org.icepdf.core.pobjects.fonts.nfont.NFontTrueType.<init>(Unknown Source)
      ... 17 more

        Activity

        Hide
        Patrick Corless added a comment -

        The embedded font has a state issue and was throwing an exception. Iv'e updated the logic and added a few length checks. In generally we try to render using the specified font rather then just bailing.

        The font in this case is a CID with now Unicode values so being able to correctly parse the font is very important as font substitution will not work.

        Show
        Patrick Corless added a comment - The embedded font has a state issue and was throwing an exception. Iv'e updated the logic and added a few length checks. In generally we try to render using the specified font rather then just bailing. The font in this case is a CID with now Unicode values so being able to correctly parse the font is very important as font substitution will not work.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: