ICEpdf
  1. ICEpdf
  2. PDF-779

Unable to reference font resource by Basefont name

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.6_P01
    • Fix Version/s: 5.0.7
    • Component/s: Core/Parsing
    • Labels:
      None
    • Environment:
      PRO

      Description

      The PDF in question (see support case) contains a few digital signature annotations which contain content stream which refer to font names that are not in the xObjects resource dictionary.

      Technically this is a malformed PDF but there are some underlying issue we can correct. The initial font failure occurs because we have some old code that will search the font resource dictionary of the first page for the font name in question. However when the first page is garbage collected subsequent call result in a null pointer which inadvertently turns off the font engine.

      I've update our Resources.getFont() call to also check the requested name against the fonts basename value which addresses the initial issue with a null font reference for the given font name.

        Activity

        Patrick Corless created issue -
        Patrick Corless made changes -
        Field Original Value New Value
        Fix Version/s 5.0.7 [ 11470 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #41780 Tue Jul 15 11:10:45 MDT 2014 patrick.corless PDF-779 updated font resource searching to check base font names if the font can't be found by name. Also added code protection to avoid turning off the font engine in there is name lookup exception.
        Files Changed
        Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/util/content/AbstractContentParser.java
        Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/pobjects/fonts/Font.java
        Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/pobjects/Resources.java
        Hide
        Patrick Corless added a comment -

        Added code protection to avoid turning off the font engine when a named font can't be found. Also added a deep search for a font named resource that uses the font base name to try and correctly for a font name that is not found in the main resource font dictionary.

        Show
        Patrick Corless added a comment - Added code protection to avoid turning off the font engine when a named font can't be found. Also added a deep search for a font named resource that uses the font base name to try and correctly for a font name that is not found in the main resource font dictionary.
        Patrick Corless made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Arran Mccullough made changes -
        Support Case References Support Case #12007 - https://icesoft.my.salesforce.com/5007000000RVZkr
        Patrick Corless made changes -
        Fix Version/s 5.1 [ 10675 ]
        Fix Version/s 5.0.7 [ 11470 ]
        Patrick Corless made changes -
        Fix Version/s 5.0.7 [ 11470 ]
        Fix Version/s 5.1 [ 10675 ]
        Patrick Corless made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: