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

IOException: Error reading stream, expected='endstream' actual='' at offset 430840

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.0.7
    • Component/s: Parsing
    • Labels:
      None
    • Environment:
      Win7, jdk1.8.0_60 x64

      Description

      The following stacktrace is shown with ExtractText and PDFReader when opening a file previously parsed by 1.8.10 (and opened by chrome and icepdf):

      java.lang.RuntimeException: java.io.IOException: Error reading stream, expected='endstream' actual='' at offset 430840
          org.apache.pdfbox.debugger.PDFDebugger.openMenuItemActionPerformed(PDFDebugger.java:593)
          org.apache.pdfbox.debugger.PDFDebugger.access$400(PDFDebugger.java:113)
          org.apache.pdfbox.debugger.PDFDebugger$4.actionPerformed(PDFDebugger.java:312)
          java.security.AccessController.doPrivileged(Native Method)
          java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
          java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
          java.security.AccessController.doPrivileged(Native Method)
          java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
      Caused by: java.io.IOException: Error reading stream, expected='endstream' actual='' at offset 430840
          org.apache.pdfbox.pdfparser.COSParser.parseCOSStream(COSParser.java:996)
          org.apache.pdfbox.pdfparser.COSParser.parseFileObject(COSParser.java:760)
          org.apache.pdfbox.pdfparser.COSParser.parseObjectDynamically(COSParser.java:721)
          org.apache.pdfbox.pdfparser.COSParser.parseObjectDynamically(COSParser.java:652)
          org.apache.pdfbox.pdfparser.COSParser.parseDictObjects(COSParser.java:612)
          org.apache.pdfbox.pdfparser.PDFParser.initialParse(PDFParser.java:215)
          org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:249)
          org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:840)
          org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:780)
          org.apache.pdfbox.debugger.PDFDebugger.parseDocument(PDFDebugger.java:1243)
          org.apache.pdfbox.debugger.PDFDebugger.readPDFFile(PDFDebugger.java:1165)
          org.apache.pdfbox.debugger.PDFDebugger.openMenuItemActionPerformed(PDFDebugger.java:587)
          org.apache.pdfbox.debugger.PDFDebugger.access$400(PDFDebugger.java:113)
          org.apache.pdfbox.debugger.PDFDebugger$4.actionPerformed(PDFDebugger.java:312)
          java.security.AccessController.doPrivileged(Native Method)
          java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
          java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
          java.security.AccessController.doPrivileged(Native Method)
          java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
      

        Attachments

          Activity

            People

            • Assignee:
              lehmi Andreas Lehmkühler
              Reporter:
              lfcnassif Luis Filipe Nassif
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: