Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-2935

Problem while extracting font from PDFontSetting (used in PDExtendedGraphicsState)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.10, 1.8.11, 2.0.0
    • Fix Version/s: 1.8.11, 2.0.0
    • Component/s: Parsing, PDModel
    • Labels:
      None

      Description

      PDFontSetting.getFont() :

      public PDFont getFont() throws IOException
          {
              PDFont retval = null;
              COSBase font = fontSetting.get( 0 );
              if( font instanceof COSDictionary )
              {
                  retval = PDFontFactory.createFont( (COSDictionary)font );
              }
              return retval;
          }
      

      If font is referenced as indirect object this method returns null, while font is valid and present in document.
      Example :

      10 0 obj
      <<
      /Font [13 0 R 60000]
      /Type /ExtGState
      >>
      endobj
      
      13 0 obj
      <<
      /BaseFont /ASJKFO+Arial-BoldMT
      /Encoding /WinAnsiEncoding
      /FirstChar 65
      /FontDescriptor 16 0 R
      /LastChar 65
      /Subtype /TrueType
      /Type /Font
      /Widths [722]
      >>
      endobj
      

        Attachments

          Activity

            People

            • Assignee:
              tilman Tilman Hausherr
              Reporter:
              exerus94 Timur Kamalov
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: