From 11c66a31048b8d0bff5e4f0ede028149364aada5 Mon Sep 17 00:00:00 2001 From: tannevaled Date: Sun, 11 Oct 2026 18:38:53 +0200 Subject: [PATCH] Layers close one, and closed a disclosure on the way MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- README.md | 6 +++--- parity/table.go | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9bd2788..99a9496 100644 --- a/README.md +++ b/README.md @@ -766,9 +766,9 @@ bentoparity -tools ~/src/bentopdf/docs/tools -pdfops ./pdfops -src ~/src/go-pdfk ``` ``` -covered 80 -not covered 34 -parity 70.2% (80/114), every claim verified +covered 81 +not covered 33 +parity 71.1% (81/114), every claim verified ``` ⛔ **It refuses to report a figure if a single claim cannot be checked.** A diff --git a/parity/table.go b/parity/table.go index 379a184..a0a8e4b 100644 --- a/parity/table.go +++ b/parity/table.go @@ -32,6 +32,7 @@ var BentoPDF = []Claim{ {Tool: "add-stamps", Claim: "verb:stamp"}, {Tool: "page-numbers", Claim: "verb:number"}, {Tool: "add-page-labels", Claim: "verb:labels"}, + {Tool: "pdf-layers", Claim: "verb:layers"}, {Tool: "bates-numbering", Claim: "verb:bates"}, // --- the file itself ---------------------------------------------------