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

NullPointerException in Type1Parser.read

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.3, 2.0.4
    • Fix Version/s: 2.0.5, 3.0.0 PDFBox
    • Component/s: FontBox
    • Labels:
    • Environment:
      Windows 10, java version "1.8.0_25"

      Description

      Text extraction from certain PDFs is not possible and PDF Box responses with NullPointerException. Text extraction from same PDF with version 1.8.13 is working.

      Originally the issue was discovered while using the newest Apache Tika 1.14 library. I can not down-grade to PDF Box 1.8.13 with Apache Tika 1.14.

      Unfortunately I can not provide the PDFs that fail to you. However, I did some testing and found out that “Token token = lexer.nextToken();” return Null.

      Feb 07, 2017 12:17:40 PM org.apache.pdfbox.pdmodel.font.PDType1Font <init>
      SEVERE: Can't read the embedded Type1 font AAAAAB+Arial-BoldMT
      java.io.IOException: Found token=null but expected NAME

      Caused by: java.io.EOFException
      at org.apache.pdfbox.io.ScratchFileBuffer.seek(ScratchFileBuffer.java:302)
      at org.apache.pdfbox.pdfparser.COSParser.checkXRefOffset(COSParser.java:1177)
      at org.apache.pdfbox.pdfparser.COSParser.parseXref(COSParser.java:202)

        Attachments

        1. StackTrace.txt
          2 kB
          Manuel Gübeli
        2. F1.txt
          1 kB
          Manuel Gübeli
        3. F2.txt
          2 kB
          Manuel Gübeli
        4. F1.PFB
          14 kB
          Manuel Gübeli
        5. F2.PFB
          18 kB
          Manuel Gübeli
        6. Resources_ScreenShot.GIF
          33 kB
          Manuel Gübeli

          Issue Links

            Activity

              People

              • Assignee:
                tilman Tilman Hausherr
                Reporter:
                guebeli Manuel Gübeli
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: