Skip to content

Layers close one, and closed a disclosure on the way - #108

Merged
tannevaled merged 1 commit into
mainfrom
layers-close-one
Oct 11, 2026
Merged

tannevaled merged 1 commit into
mainfrom
layers-close-one

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

pdf-layers is claimed, through pdfops layers in go-pdfkit/ops v0.15.0.

covered       81
not covered   33
parity       71.1% (81/114), every claim verified

⛔⛔ Building it found that every ops verb was revealing a hidden layer

Measured with a probe written for the purpose: a drawing with a layer switched
off, run through pdfops watermark, came back with no /OCProperties at
all
— the content still marked as belonging to a layer, the layer object
still reachable through the page's resources, and nothing left saying which
layer was hidden. So it showed.

That is the second loss of this kind in two pieces of work — page labels
went the same way, for the same reason: a catalogue entry that cannot be copied
across a rebuild was dropped rather than rebuilt. The difference is the
consequence:

page labels a renumbered toolbar — a defect
optional content a revealed layer — a disclosure

Both are rebuilt now, and in both cases a mutation restoring the old behaviour
is caught.

Measured 2026-10-11 against BentoPDF 3a5f146 (v2.8.8, 114 tools), pdfops
and ops at v0.15.0, ooxml v0.2.0, opc v0.1.0, odf 3d1deee
(= v0.7.0), convert 45fbb5d, render 3bb5dcf, app 1feda5d, rtf
6bc4897, markdown eafebfd, data 128b6c7.

🤖 Generated with Claude Code

pdf-layers is claimed, through `pdfops layers` in go-pdfkit/ops v0.15.0.

⛔⛔ Building it found that every ops verb was REVEALING a hidden layer.
Measured with a probe: a drawing with a layer switched off, run through
`pdfops watermark`, came back with no /OCProperties at all — the content still
marked as belonging to a layer, the layer object still reachable through the
page's resources, and nothing left saying which layer was hidden. So it showed.
A drawing distributed with an "internal pricing" layer turned off revealed it
to any verb at all.

That is the second loss of this kind in two pieces of work: page labels went
the same way, for the same reason — a catalogue entry that cannot be copied
across a rebuild was dropped rather than rebuilt. The difference is the
consequence: a renumbered toolbar is a defect, a revealed layer is a
disclosure.

What the file says about its own layers is now obeyed: /BaseState OFF inverts
the question, /Locked refuses to be switched, and the nesting is written back
nested. Dropping a HIDDEN layer is refused, because its content stays in the
page and stops being optional — the hidden drawing would become permanently
visible.

Pasted from the tool's own output:

    covered       81
    not covered   33
    parity       71.1% (81/114), every claim verified

Measured 2026-10-11 against BentoPDF 3a5f146 (v2.8.8, 114 tools), pdfops and
ops at v0.15.0, ooxml v0.2.0, opc v0.1.0, odf 3d1deee (= v0.7.0), convert
45fbb5d, render 3bb5dcf, app 1feda5d, rtf 6bc4897, markdown eafebfd,
data 128b6c7.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@tannevaled
tannevaled merged commit b920171 into main Oct 11, 2026
9 checks passed
@tannevaled
tannevaled deleted the layers-close-one branch October 11, 2026 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant