#1477·pdfcpu

pdfcpu validate fails on a valid PDF where a page resource dictionary contains a /Properties entry pointing to a stream dictionary.

Author: lazaromedinaCreated Sep 9, 2026Updated Sep 14, 2026
Labelsinvestigate

Problem

pdfcpu validate failss on a valid PDF where a page resource dictionary containing a /Properties entry pointing to a stream dictionary.

The stream content itself is not relevantm, the important structure is:

pdf
/Resources << /Font << /F1 6 0 R >> /Properties << /P1 5 0 R >> >>
...
5 0 obj
<< /MCID 0 /Length 0 >>
stream
endstream
endobj

Reproducer

I attached a minimal synthetic PDF:

properties-streamdict-resource.pdf

It is a one-page PDF 1.4 file with visible explanatory text. The text uses a normal font resource. The failing object is only the /Properties /P1 stream dictionary.

Command:

bash
pdfcpu -c disable validate --mode strict properties-streamdict-resource.pdf

Actual Result

validating(mode=strict) properties-streamdict-resource.pdf ...
validate properties-streamdict-resource.pdf: validation error (obj#:5) (try --mode=relaxed): document catalog: catalog Pages: page tree: page obj#3: propertiesResourceDict.P1 obj#5: propertiesDict obj#5: dereference: obj#5 gen#0: expected types.Dict, got types.StreamDict

The same also fails in relaxed mode and when using split.

Expected Result

Validation should succeed.

A PDF stream object has a stream dictionary, and in this case the dictionary part is what the /Properties validation needs.

Environment

Tested from a checkout of current master:

commit: 105c0c28727afe7f85eb3179d03e9810d8774981
describe: v0.15.0-1-g105c0c28
nearest release: v0.15.0

Command used against the source checkout:

bash
go run ./cmd/pdfcpu -c disable validate --mode properties-streamdict-resource.pdf

OS:

macOS 15.7.9 (Build 24G830), darwin/arm64

properties-streamdict-resource.pdf