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

java.io.IOException: Error: End-of-File, expected line during PDDocument.load

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 2.0.20, 2.0.21
    • None
    • Parsing
    • None
    • Debian, MacOs, open JDK 12

    Description

      I got an I/O Exception when I try to open some PDF using the lib (calling PDDocument.load(pdfFile)). Here are some urls with affected PDF (I think it's the same problem for all of them) :

      I think the files are not well formatted and doesn't respect PDF specs but I can open them using other pdf viewer (like chrome pdf viewer for example)

       

      Here is the stack trace : 

      java.io.IOException: Error: End-of-File, expected linejava.io.IOException: Error: End-of-File, expected line at org.apache.pdfbox.pdfparser.BaseParser.readLine(BaseParser.java:1098) at org.apache.pdfbox.pdfparser.COSParser.parseHeader(COSParser.java:2581) at org.apache.pdfbox.pdfparser.COSParser.parsePDFHeader(COSParser.java:2560) at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:219) at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1099) at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1082) at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1041) at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:989)
      

      Attachments

        1. Rehbein_Schule_Hanau_9_2018.pdf
          2.37 MB
          Nicolas M
        2. Rehbein_Schule_Hanau_9_2018.txt
          3 kB
          Maruan Sahyoun

        Activity

          People

            Unassigned Unassigned
            nmarlk Nicolas M
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: