From 921dc4b71cefda333679e7f0aae9191956880dc1 Mon Sep 17 00:00:00 2001 From: tannevaled Date: Sun, 11 Oct 2026 18:06:22 +0200 Subject: [PATCH] Page labels close one, and fixed a loss in every verb on the way MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit add-page-labels is claimed, through `pdfops labels` in go-pdfkit/ops v0.14.0. ⛔ Building it found that EVERY ops verb was silently dropping the page labels. A /PageLabels tree is keyed by page INDEX, so it cannot be carried the way the other document keys are — after a select or a reverse every label would be on the wrong page — so the package dropped it, and a document whose front matter was numbered i, ii, iii came back from a WATERMARK numbered 1, 2, 3. They are asked for per page and rebuilt now. Four things the format says that the fiche does not, each of which would have been a silent defect: - a page-label range is CONTIGUOUS, so a rule over "1-9,30-40" has to be compiled into two runs, and "odd" into one run per page; - a page-label tree has NO GAPS: an entry labels until the next one, so "1, 2, then nothing" came back 1, 2, 3, 4 until the stop was written out explicitly. The round-trip through the file caught it; - /St shall be at least 1 (ISO 32000-1 table 159) — so BentoPDF's own "set to 0 for zero-based numbering" writes a value the standard FORBIDS, and this refuses it instead; - the letters are NOT a spreadsheet's columns: 27 is AA and 28 is BB, where a spreadsheet's 28 is AB. Pasted from the tool's own output: covered 80 not covered 34 parity 70.2% (80/114), every claim verified Measured 2026-10-11 against BentoPDF 3a5f146 (v2.8.8, 114 tools), pdfops and ops at v0.14.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 90f6d9c..9bd2788 100644 --- a/README.md +++ b/README.md @@ -766,9 +766,9 @@ bentoparity -tools ~/src/bentopdf/docs/tools -pdfops ./pdfops -src ~/src/go-pdfk ``` ``` -covered 79 -not covered 35 -parity 69.3% (79/114), every claim verified +covered 80 +not covered 34 +parity 70.2% (80/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 079b9be..379a184 100644 --- a/parity/table.go +++ b/parity/table.go @@ -31,6 +31,7 @@ var BentoPDF = []Claim{ {Tool: "add-watermark", Claim: "verb:watermark"}, {Tool: "add-stamps", Claim: "verb:stamp"}, {Tool: "page-numbers", Claim: "verb:number"}, + {Tool: "add-page-labels", Claim: "verb:labels"}, {Tool: "bates-numbering", Claim: "verb:bates"}, // --- the file itself ---------------------------------------------------