Skip to content

dereferenceObject: problem dereferencing stream #907

@rorycl

Description

@rorycl

Hi @hhrutter -- thanks a lot for this invaluable project.

Problem

Error on v0.0.8:

dereferenceObject: problem dereferencing stream 7:
pdfcpu: loadEncodedStreamContent: missing streamLength

File: here.

OS: Debian Linux (testing).

Details

Having just upgraded pdfcpu to v0.8.0 (from v0.5.0) on a new branch of my project rm2pdf some of my tests using pdfcpu are failing with dereferenceObject: problem dereferencing stream 7: pdfcpu: loadEncodedStreamContent: missing streamLength. This seems similar to issue #786, which was caused by an invalid PDF file. Apologies if this is another issue with an invalid PDF.

This may be an invalid file (certainly github won't show it), but qpdf and jhove from Open Preservation give it a thumbs-up. I've put the top of jhove output at the end of this report. I've had a go at re-cleaning the file with pdftk but that hasn't helped either.

If there is another PDF validation tool you recommend running please consider adding that to the bug report template.

Jhove (Rel. 1.30.0, 2024-06-03)
 Date: 2024-07-04 12:35:12 BST
 RepresentationInformation: ../testfiles/e724bba2-266f-434d-aaf2-935d2b4
  ReportingModule: PDF-hul, Rel. 1.12.5 (2024-03-05)
  LastModified: 2022-09-12 01:21:22 BST
  Size: 9860
  Format: PDF
  Version: 1.5
  Status: Well-Formed and valid
  SignatureMatches:
   PDF-hul
  MIMEtype: application/pdf
  PDFMetadata:
   Objects: 21
   FreeObjects: 4
   IncrementalUpdates: 0
   DocumentCatalog:
    PageLayout: SinglePage
    PageMode: UseNone
   Info:
    Creator: pdftk-java 3.2.2
    Producer: itext-paulo-155 (itextpdf.sf.net-lowagie.com)
    CreationDate: Fri Sep 09 14:15:25 BST 2022
    ModDate: Fri Sep 09 14:15:25 BST 2022

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions