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

NullPointerException on Type1Parser.readCharStrings(Type1Parser.java:713)

    XMLWordPrintableJSON

Details

    Description

      When trying to open the attached file with PDFBox, I get a null pointer exception:
      java.lang.NullPointerException
      at org.apache.fontbox.type1.Type1Parser.readCharStrings(Type1Parser.java:713)
      at org.apache.fontbox.type1.Type1Parser.parseBinary(Type1Parser.java:576)
      at org.apache.fontbox.type1.Type1Parser.parse(Type1Parser.java:64)
      at org.apache.fontbox.type1.Type1Font.createWithSegments(Type1Font.java:85)
      at org.apache.pdfbox.pdmodel.font.PDType1Font.<init>(PDType1Font.java:262)
      at org.apache.pdfbox.pdmodel.font.PDFontFactory.createFont(PDFontFactory.java:62)
      at org.apache.pdfbox.pdmodel.PDResources.getFont(PDResources.java:143)
      at org.apache.pdfbox.contentstream.operator.text.SetFontAndSize.process(SetFontAndSize.java:60)
      at org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:838)
      at org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:495)
      at org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:469)
      at org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:150)
      at org.apache.pdfbox.text.LegacyPDFStreamEngine.processPage(LegacyPDFStreamEngine.java:139)
      at org.apache.pdfbox.text.PDFTextStripper.processPage(PDFTextStripper.java:391)
      at org.apache.pdfbox.text.PDFTextStripper.processPages(PDFTextStripper.java:319)
      at org.apache.pdfbox.text.PDFTextStripper.writeText(PDFTextStripper.java:266)

      Attachments

        1. Type1-Binary-7010-1508965541694.bin
          7 kB
          Tilman Hausherr
        2. NullReadCharStrings.pdf
          123 kB
          Jay Askren

        Activity

          People

            tilman Tilman Hausherr
            jaskren Jay Askren
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: