Repository navigation
Page labels close one, and fixed a loss in every verb on the way - #107
Merged
Merged
Conversation
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 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
add-page-labelsis claimed, throughpdfops labelsingo-pdfkit/opsv0.14.0.
⛔ Building it found that every
opsverb was dropping the page labelsA
/PageLabelstree is keyed by page index, so it cannot be carried the waythe other document keys are — after a
selector areverseevery label wouldbe on the wrong page — so the package dropped it. 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, which is right in both
directions, and a mutation that restores the old behaviour is caught.
Four things the format says that the fiche does not
Each would have been a silent defect if guessed:
1-9,30-40must be compiled into two runs;oddinto one run per page/St≥ 1Measured 2026-10-11 against BentoPDF
3a5f146(v2.8.8, 114 tools),pdfopsand
opsat v0.14.0,ooxmlv0.2.0,opcv0.1.0,odf3d1deee(= v0.7.0),
convert45fbb5d,render3bb5dcf,app1feda5d,rtf6bc4897,markdowneafebfd,data128b6c7.🤖 Generated with Claude Code