Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
248 commits
Select commit Hold shift + click to select a range
36a25b3
feat(cos): parse and write COS objects (#36)
michaelstonis Oct 9, 2026
1653e34
Merge remote-tracking branch 'origin/spec/33-broadside-v1' into 36-co…
michaelstonis Oct 9, 2026
b55dbd0
merge: #36 Parse COS objects from bytes
michaelstonis Oct 9, 2026
11aaeaf
docs(skills): conformance map type cells use simple names
michaelstonis Oct 9, 2026
c4eb111
feat(document): open a file and read its pages (#37)
michaelstonis Oct 9, 2026
81f8b37
Merge remote-tracking branch 'origin/spec/33-broadside-v1' into 37-op…
michaelstonis Oct 9, 2026
afe1714
merge: #37 Open a file and read its pages
michaelstonis Oct 9, 2026
100394d
feat(hosting): dependency injection parity (#46)
michaelstonis Oct 9, 2026
0cc4311
docs(conformance): correct ISO 32000-2 chapter 10, 12.10-12.11, 13.2 …
michaelstonis Oct 9, 2026
970b455
merge: #46 Dependency injection parity
michaelstonis Oct 9, 2026
13ecb99
feat(document): incremental update revisions and linearization detect…
michaelstonis Oct 9, 2026
503d92d
Merge remote-tracking branch 'origin/spec/33-broadside-v1' into 40-in…
michaelstonis Oct 9, 2026
5cbb18e
merge: #40 Incremental updates and linearization detection
michaelstonis Oct 9, 2026
647ddee
feat(filters): decode streams through filters (#38)
michaelstonis Oct 9, 2026
4f3bf91
Merge remote-tracking branch 'origin/spec/33-broadside-v1' into 38-fi…
michaelstonis Oct 9, 2026
48b1048
merge: #38 Decode streams through filters
michaelstonis Oct 9, 2026
2fdfb33
feat(cos): cross-reference streams, object streams and hybrid files (…
michaelstonis Oct 9, 2026
533f8c1
fix(cos): XRefStm entries replace free entries of their own table (#39)
michaelstonis Oct 9, 2026
306f553
merge: #39 Cross-reference streams, object streams and hybrid files
michaelstonis Oct 9, 2026
7066aae
feat(cos): lenient repair with diagnostics; strict mode throws (#41)
michaelstonis Oct 9, 2026
2a76c0c
merge: #41 Lenient repair with diagnostics; strict mode throws
michaelstonis Oct 9, 2026
dc2eb09
feat(writing): save unchanged documents and create an empty one (#44)
michaelstonis Oct 9, 2026
e3a430c
feat(cos): lazy loading, parse-once object cache and the concurrency …
michaelstonis Oct 9, 2026
9e25424
Merge remote-tracking branch 'origin/spec/33-broadside-v1' into 44-sa…
michaelstonis Oct 9, 2026
4a4c8f2
merge: #44 Save unchanged documents and create an empty one
michaelstonis Oct 9, 2026
7ce795b
Merge remote-tracking branch 'origin/spec/33-broadside-v1' into 45-la…
michaelstonis Oct 9, 2026
9896fc3
Merge remote-tracking branch 'origin/spec/33-broadside-v1' into 45-la…
michaelstonis Oct 9, 2026
d90f132
fix(cos): grow windows for cross-reference sections of any size (#45)
michaelstonis Oct 9, 2026
36db900
merge: #45 Lazy loading, object cache and the concurrency contract
michaelstonis Oct 9, 2026
70140fb
feat(security): standard security handler, all revisions, AES-GCM and…
michaelstonis Oct 9, 2026
916158f
merge: #42 Standard security handler, all revisions
michaelstonis Oct 9, 2026
8f8e4ac
feat(security): public-key security handler, adbe.pkcs7.s3/s4/s5 (#43)
michaelstonis Oct 9, 2026
e949eed
merge: #43 Public-key security handler
michaelstonis Oct 9, 2026
16b3464
test(cos): real-world corpus gate and veraPDF agreement (#47)
michaelstonis Oct 9, 2026
59d11bd
merge: #47 Real-world corpus gate
michaelstonis Oct 9, 2026
f822119
feat(document): PDF and XMP date values (#69)
michaelstonis Oct 9, 2026
fe6935e
feat(model): file specifications and embedded file streams (#76)
michaelstonis Oct 9, 2026
922792c
feat(document): XMP packet reader (#69)
michaelstonis Oct 9, 2026
d835157
feat(navigation): generic name and number tree walkers (#70)
michaelstonis Oct 9, 2026
1f1cf95
merge: #70 Name and number tree walkers (part of #70)
michaelstonis Oct 9, 2026
7ed04b4
feat(document): Info, XMP metadata, viewer preferences, extensions an…
michaelstonis Oct 9, 2026
74c59ea
feat(model): optional content groups, memberships, configurations and…
michaelstonis Oct 9, 2026
7261890
Merge remote-tracking branch 'origin/spec/33-broadside-v1' into 69-ca…
michaelstonis Oct 9, 2026
c3b3816
Merge remote-tracking branch 'origin/spec/33-broadside-v1' into 76-op…
michaelstonis Oct 9, 2026
d5053f9
feat(model): portable collections with schema, sort, colours, split a…
michaelstonis Oct 9, 2026
b5434c7
feat(document): page labels, fuzz targets and conformance rows (#69)
michaelstonis Oct 9, 2026
cc91850
feat(fonts): Standard 14 metrics and simple-font encodings (#49)
michaelstonis Oct 9, 2026
238e9c3
feat(model): associated files and object-level metadata at every loca…
michaelstonis Oct 9, 2026
1cf252b
merge: #69 Catalog essentials: page labels, viewer preferences, Info …
michaelstonis Oct 9, 2026
1735fa0
Merge remote-tracking branch 'origin/spec/33-broadside-v1' into 49-st…
michaelstonis Oct 9, 2026
ceacfe3
feat(structure): structure tree, role maps, namespaces, attributes an…
michaelstonis Oct 9, 2026
f35d96a
refactor(fonts): font diagnostic codes in their own partial file (#49)
michaelstonis Oct 9, 2026
d72f10b
test(model): optional content repairs, corpus-wide reading and the op…
michaelstonis Oct 9, 2026
f6a395e
merge: #49 Standard 14 metrics and simple-font encodings
michaelstonis Oct 9, 2026
2358e8b
feat(content): content stream interpretation of paths, transforms and…
michaelstonis Oct 9, 2026
96e856e
feat(navigation): destinations, outlines and the action base (#70)
michaelstonis Oct 9, 2026
058488c
Merge remote-tracking branch 'origin/spec/33-broadside-v1' into 76-op…
michaelstonis Oct 9, 2026
a21a4e2
feat(graphics): sampled, exponential, stitching and PostScript calcul…
michaelstonis Oct 9, 2026
ab43db5
Merge remote-tracking branch 'origin/spec/33-broadside-v1' into 55-co…
michaelstonis Oct 9, 2026
502240e
Merge remote-tracking branch 'origin/spec/33-broadside-v1' into 70-tr…
michaelstonis Oct 9, 2026
22b1d9e
feat(model): PDF Declarations from document- and object-level XMP (#76)
michaelstonis Oct 9, 2026
089b8d2
Merge remote-tracking branch 'origin/spec/33-broadside-v1' into 78-fu…
michaelstonis Oct 9, 2026
e4c3b92
test(model): optional content visibility allocates nothing; benchmark…
michaelstonis Oct 9, 2026
6abc694
merge: #75 Structure tree and marked content
michaelstonis Oct 9, 2026
0a74a83
ci(fuzz): scheduled libFuzzer run of every Phase 1 target (#48)
michaelstonis Oct 9, 2026
d04f533
docs(conformance): 7.11, 8.11, 12.3.5, 14.3.2, 14.13, AN002, AN003, P…
michaelstonis Oct 9, 2026
cee8612
docs(fuzz): describe the optional-content target (#76)
michaelstonis Oct 9, 2026
6067edc
Merge remote-tracking branch 'origin/spec/33-broadside-v1' into 76-op…
michaelstonis Oct 9, 2026
db9aa92
merge: #70 Name trees, number trees, destinations and outlines
michaelstonis Oct 9, 2026
812289f
merge: #55 Content stream interpretation: paths, transforms and clipping
michaelstonis Oct 9, 2026
525827d
test(structure): associated-files.pdf has a one-element structure tre…
michaelstonis Oct 9, 2026
fd1ee33
Merge remote-tracking branch 'origin/spec/33-broadside-v1' into 76-op…
michaelstonis Oct 9, 2026
d63e705
merge: #78 Functions: sampled, exponential, stitching and PostScript …
michaelstonis Oct 9, 2026
48c7da8
Merge remote-tracking branch 'origin/spec/33-broadside-v1' into 76-op…
michaelstonis Oct 9, 2026
06c8bf9
Merge remote-tracking branch 'origin/spec/33-broadside-v1' into 76-op…
michaelstonis Oct 9, 2026
ead075c
test: measure allocations in steady state, one at a time (#48)
michaelstonis Oct 9, 2026
c9aa3d6
merge: #76 Optional content, embedded and associated files, metadata …
michaelstonis Oct 9, 2026
c6ca5dd
test(actions): actions-all and actions-preserved corpus files and the…
michaelstonis Oct 9, 2026
01c59e6
Merge remote-tracking branch 'origin/spec/33-broadside-v1' into 73-ac…
michaelstonis Oct 9, 2026
ac93fd1
ci(fuzz): cache key without commas; 80 minutes per target (#48)
michaelstonis Oct 9, 2026
aedf26a
Merge origin/spec/33-broadside-v1 into 48-fuzz-baseline
michaelstonis Oct 9, 2026
7b38d76
feat(actions): every action type, Next chains and trigger events, scr…
michaelstonis Oct 9, 2026
d61bc51
merge: #73 Actions, with parse-and-preserve for scripts and multimedia
michaelstonis Oct 9, 2026
57e0011
feat(annotations): every annotation subtype with appearances (#71)
michaelstonis Oct 9, 2026
3504f8c
fix(cos): bound cross-reference stream entries; refuse sparse saves (…
michaelstonis Oct 9, 2026
b990b7a
Merge integration tip (#73) into 71-annotations
michaelstonis Oct 9, 2026
4f41c66
docs(conformance): note the entry budget and sparse-save refusal (#48)
michaelstonis Oct 9, 2026
fca8419
merge: #71 Annotations, every subtype
michaelstonis Oct 9, 2026
787300d
Merge origin/spec/33-broadside-v1 (#71, #73) into 48-fuzz-baseline
michaelstonis Oct 9, 2026
a1b614c
feat(fonts): embedded TrueType glyph outlines and the font program pa…
michaelstonis Oct 9, 2026
91e03a7
Merge remote-tracking branch 'origin/spec/33-broadside-v1' into 50-tr…
michaelstonis Oct 9, 2026
641ecec
merge: #50 Embedded TrueType glyph outlines
michaelstonis Oct 9, 2026
2e799f5
fix(fuzz): page labels keep their whole prefix; bound the label by it…
michaelstonis Oct 9, 2026
ba29aa1
feat(graphics): colour spaces and the colour-management extension poi…
michaelstonis Oct 9, 2026
de00556
fix(bench): link the action and annotation walkers DocumentWalker now…
michaelstonis Oct 9, 2026
db929d4
Merge remote-tracking branch 'origin/spec/33-broadside-v1' into 77-co…
michaelstonis Oct 9, 2026
56af7e6
merge: #77 Color spaces and the color-management extension point
michaelstonis Oct 9, 2026
3fff03e
build: stop tracking Python bytecode
michaelstonis Oct 9, 2026
282aa58
feat(forms): read the interactive form field tree, typed fields and X…
michaelstonis Oct 9, 2026
06a6a08
Merge remote-tracking branch 'origin/spec/33-broadside-v1' into 74-fo…
michaelstonis Oct 9, 2026
ea8b8b7
merge: #74 Interactive forms: reading fields
michaelstonis Oct 9, 2026
ce14963
feat(fonts): composite fonts with CIDFontType2, Identity and embedded…
michaelstonis Oct 9, 2026
e9d0437
Merge remote-tracking branch 'origin/spec/33-broadside-v1' into 53-co…
michaelstonis Oct 9, 2026
b749123
refactor(fonts): drop two unused CMap diagnostic codes (#53)
michaelstonis Oct 9, 2026
5b50bec
merge: #53 Composite fonts with CIDFontType2 and CMaps
michaelstonis Oct 9, 2026
141d5bc
feat(fonts): Type 1 glyph outlines from embedded FontFile programs (#52)
michaelstonis Oct 9, 2026
c25bf59
Merge remote-tracking branch 'origin/spec/33-broadside-v1' into 52-ty…
michaelstonis Oct 9, 2026
b89b734
merge: #52 Type 1 glyph outlines
michaelstonis Oct 9, 2026
418e854
feat(graphics): shadings and patterns as resolved models (#79)
michaelstonis Oct 9, 2026
bfb6dd9
Merge remote-tracking branch 'origin/spec/33-broadside-v1' into 79-sh…
michaelstonis Oct 9, 2026
7e59c95
merge: #79 Shadings and patterns as resolved models
michaelstonis Oct 9, 2026
7458df1
feat(fonts): CFF and OpenType-CFF glyph outlines (#51)
michaelstonis Oct 9, 2026
49772dd
merge: #51 CFF and OpenType-CFF glyph outlines
michaelstonis Oct 9, 2026
69cb8a2
feat(images): image XObjects, masks, inline images and the decoded-im…
michaelstonis Oct 9, 2026
9d6edf1
Merge remote-tracking branch 'origin/spec/33-broadside-v1' into 60-im…
michaelstonis Oct 9, 2026
9ff137d
merge: #60 Image XObjects, masks and inline images
michaelstonis Oct 9, 2026
df58414
bench: Phase 1 baseline, default job, with allocation figures (#48)
michaelstonis Oct 10, 2026
1cc4f41
feat(content): text, form XObjects, inline images, graphics state par…
michaelstonis Oct 10, 2026
aa0354f
merge: #56 Text, form XObjects, inline images and graphics-state para…
michaelstonis Oct 10, 2026
f61e6fb
Merge origin/spec/33-broadside-v1 (#51, #52, #60, #79 and others) int…
michaelstonis Oct 10, 2026
8013689
merge: #48 Phase 1 fuzz run and benchmark baseline
michaelstonis Oct 10, 2026
45e87ee
feat(fonts): Type 3 glyph descriptions with d0/d1 and font resources …
michaelstonis Oct 10, 2026
a4d43bf
Merge remote-tracking branch 'origin/spec/33-broadside-v1' into 57-ty…
michaelstonis Oct 10, 2026
ebc1e2a
feat(fonts): Standard 14 glyph package and the font resolver (#59)
michaelstonis Oct 10, 2026
c538d0b
feat(filters): CCITT Group 3 and Group 4 decoding (#63)
michaelstonis Oct 10, 2026
ae10a93
Merge remote-tracking branch 'origin/spec/33-broadside-v1' into 59-st…
michaelstonis Oct 10, 2026
325d861
test(fonts): measure the Type 3 allocation test through Allocations.M…
michaelstonis Oct 10, 2026
887dcf0
Merge remote-tracking branch 'origin/spec/33-broadside-v1' into 63-ccitt
michaelstonis Oct 10, 2026
f148612
merge: #57 Type 3 fonts
michaelstonis Oct 10, 2026
4771484
merge: #59 Standard 14 glyph package and the font resolver
michaelstonis Oct 10, 2026
40c2fc4
feat(filters): JPEG 2000 codestream decoding, reversible 5/3 (#67)
michaelstonis Oct 10, 2026
5e74de4
Merge remote-tracking branch 'origin/spec/33-broadside-v1' into 67-jp…
michaelstonis Oct 10, 2026
c3dc32b
merge: #63 CCITT Group 3 and Group 4 decoding
michaelstonis Oct 10, 2026
8b9c558
merge: #67 JPEG 2000 codestream, single tile, reversible 5/3
michaelstonis Oct 10, 2026
f3ccf18
feat(filters): DCT baseline and extended sequential decoding (#61)
michaelstonis Oct 10, 2026
0bd4c53
test(content): real-world content interpreter corpus gate (#80)
michaelstonis Oct 10, 2026
1465058
docs(benchmarks): Phase 2 content interpretation baseline (#80)
michaelstonis Oct 10, 2026
43a5aac
Merge remote-tracking branch 'origin/spec/33-broadside-v1' into 61-dc…
michaelstonis Oct 10, 2026
8bace2b
merge: #61 DCT baseline decoding
michaelstonis Oct 10, 2026
946fe45
Merge origin/spec/33-broadside-v1 (#48, #57, #59, #63, #67) into 80-c…
michaelstonis Oct 10, 2026
f2c544b
merge: #80 Content interpreter corpus gate
michaelstonis Oct 10, 2026
b4b900b
feat(fonts): CID-keyed CFF and the predefined CMaps package (#54)
michaelstonis Oct 10, 2026
fda9223
Merge remote-tracking branch 'origin/spec/33-broadside-v1' into 54-ci…
michaelstonis Oct 10, 2026
0aab45c
feat(filters): JBIG2Decode with generic regions and MMR (#64)
michaelstonis Oct 10, 2026
3e399f1
merge: #64 JBIG2 generic regions and MMR
michaelstonis Oct 10, 2026
98e8ee3
test(content): triage the corpus gate for CID-keyed CFF and predefine…
michaelstonis Oct 10, 2026
bf7437d
merge: #54 CID-keyed CFF and predefined CMaps package
michaelstonis Oct 10, 2026
6558704
feat(filters): DCT progressive, arithmetic, 12-bit, CMYK and YCCK (#62)
michaelstonis Oct 10, 2026
22d80eb
Merge remote-tracking branch 'origin/spec/33-broadside-v1' into 62-dc…
michaelstonis Oct 10, 2026
91b9e0b
test(content): accept the pdfium gate count after DCT progressive dec…
michaelstonis Oct 10, 2026
0c9b69c
merge: #62 DCT progressive, CMYK and YCCK
michaelstonis Oct 10, 2026
c32bce8
feat(filters): JPEG 2000 full Part 1 decoding and JP2 colour (#68)
michaelstonis Oct 10, 2026
5ded5a6
Merge remote-tracking branch 'origin/spec/33-broadside-v1' into 68-jp…
michaelstonis Oct 10, 2026
fd0e8ca
merge: #68 JPEG 2000 full Part 1 decoding
michaelstonis Oct 10, 2026
c57d735
feat(fonts): map character codes to Unicode for every font type (#58)
michaelstonis Oct 10, 2026
896def0
Merge remote-tracking branch 'origin/spec/33-broadside-v1' into 58-co…
michaelstonis Oct 10, 2026
b133ce7
merge: #58 Character codes to Unicode for every font type
michaelstonis Oct 10, 2026
49a2507
feat(filters): JBIG2 symbol, text, refinement and halftone regions (#65)
michaelstonis Oct 10, 2026
dd12b9e
Merge remote-tracking branch 'origin/spec/33-broadside-v1' into 65-jb…
michaelstonis Oct 10, 2026
27845bc
merge: #65 JBIG2 symbol, text, refinement and halftone regions
michaelstonis Oct 10, 2026
c069088
test(writing): accept qpdf 11 and 12 behaviour on name-tree key order
michaelstonis Oct 10, 2026
c78d356
test(filters): measure CCITT, JPX and DCT allocations through Allocat…
michaelstonis Oct 10, 2026
ce5d0bb
docs(images): cite clauses on DecodedImageBuilder and ImageDecodeMap;…
michaelstonis Oct 10, 2026
d15d990
fix(diagnostics): keep the most severe diagnostic per dedup key
michaelstonis Oct 10, 2026
3182277
refactor(filters): one once-per-code reporter for the DCT, JPX and JB…
michaelstonis Oct 10, 2026
f86a98f
fix(content): select a coloured pattern named alone; ignored colour o…
michaelstonis Oct 10, 2026
4869ad1
fix(fonts): Type 1 charstrings honour MaxCharStringOperators and shar…
michaelstonis Oct 10, 2026
1d83b43
refactor(fonts): one diagnostics collector for CMapContext and FontPr…
michaelstonis Oct 10, 2026
703a051
fix(linearization): decode hint streams through the filter pipeline
michaelstonis Oct 10, 2026
98e98c7
refactor(images): one inline-image abbreviation table for the image m…
michaelstonis Oct 10, 2026
4c74acb
feat(content): glyph events carry their device-space origin and advance
michaelstonis Oct 10, 2026
63d5418
refactor(filters)!: name the image mask and the size limit one way
michaelstonis Oct 10, 2026
363254e
refactor(fonts): one cmap subtable selection per program for TrueType…
michaelstonis Oct 10, 2026
3d04766
docs(conformance): correct rows 7.8.3, 8.6.7 and 8.7.3
michaelstonis Oct 10, 2026
2f72f2e
refactor(model): one entry reader with one leniency policy
michaelstonis Oct 10, 2026
5bb4301
refactor(fonts): program code points through a PdfSimpleFont virtual …
michaelstonis Oct 10, 2026
6fb63d9
fix(model): report missing or mistyped OC group and collection folder…
michaelstonis Oct 10, 2026
5822f43
perf(fonts): no per-call allocation from span literals or lazy-init d…
michaelstonis Oct 10, 2026
aa9c215
test(fuzz): content targets open a document per call
michaelstonis Oct 10, 2026
ce006b4
fix(xref): route in-use entries at offset 0 through the misplaced-obj…
michaelstonis Oct 10, 2026
74ca59c
docs(model): clause remarks, NormalCaption name, StructureTree test n…
michaelstonis Oct 10, 2026
2a42cd6
fix(filters): decode predicted data shorter than one row as a partial…
michaelstonis Oct 10, 2026
e715b1c
fix(jpx): report bare codestreams, ignored JPX codestreams and HTJ2K
michaelstonis Oct 10, 2026
b4adff0
fix(graphics): pad each Type 6/7 patch to whole bytes, read unpadded …
michaelstonis Oct 10, 2026
71464bb
fix(fonts): a code without a usable Widths element takes its glyph's …
michaelstonis Oct 10, 2026
fb00933
fix(model): key annotation, field and optional content caches on cont…
michaelstonis Oct 10, 2026
ca0ec1e
test(document): bound process private memory for the 2 GiB file; xref…
michaelstonis Oct 10, 2026
c771647
fix(fonts): a Type 1 program's ISOLatin1Encoding by name is read as t…
michaelstonis Oct 10, 2026
ef74995
feat(ccitt): decode uncompressed mode
michaelstonis Oct 10, 2026
079e3ed
refactor(forms)!: PdfField.Flags and PdfOutlineItem.Flags as [Flags] …
michaelstonis Oct 10, 2026
d18edf5
fix(images): repair a codec component count that differs from the col…
michaelstonis Oct 10, 2026
03cfa4d
perf(bench): content and colour benchmarks return a value; one conten…
michaelstonis Oct 10, 2026
ca050a5
fix(annotations): text annotation State defaults to its state model's…
michaelstonis Oct 10, 2026
11c23c1
test(graphics): mesh allocation tests measure through Allocations.Mea…
michaelstonis Oct 10, 2026
18fc0b5
fix(forms): nested unnamed field levels inherit from the nearest one
michaelstonis Oct 10, 2026
64bb6c3
refactor(content): name the nested-run partials for what they hold
michaelstonis Oct 10, 2026
0ca8830
refactor(content): ContentPart replaces the (Start, Reference) tuple
michaelstonis Oct 10, 2026
dba7cef
fix(linearization): decode filtered hint streams through the filter p…
michaelstonis Oct 10, 2026
c23fbb0
feat(navigation): find structure destination pages; expose a named de…
michaelstonis Oct 10, 2026
302f432
perf(catalog): GetLabels reads each range once and shares its prefix
michaelstonis Oct 10, 2026
e64d6f0
refactor(graphics): one diagnostic recorder per graphics object; Devi…
michaelstonis Oct 10, 2026
748601e
docs(conformance): document-model rows after the wrap-up fixes
michaelstonis Oct 10, 2026
89970fd
fix(security): AuthEvent EFOpen documents open without the user password
michaelstonis Oct 10, 2026
7d46e8f
test(corpus): accept LinearizationHintsInvalid on three qpdf files
michaelstonis Oct 10, 2026
d42b2b5
fix(fonts): recover sfnt tables whose directory offsets are one byte off
michaelstonis Oct 10, 2026
a1462a6
test(corpus): add jpx-smask-in-data.pdf, a JPEG 2000 opacity channel …
michaelstonis Oct 10, 2026
0f2058d
test(fonts): every text corpus file maps to its known text, the damag…
michaelstonis Oct 10, 2026
6895e17
merge: review fix pass — document model
michaelstonis Oct 10, 2026
3855f38
fix(dct): report the R,G,B-identifier fallback from Table 13's defaul…
michaelstonis Oct 10, 2026
6a0c44b
docs(plan): Phase 3 to 6 ticket tables
michaelstonis Oct 10, 2026
ce0c964
feat(dct): decode frames of more than four components
michaelstonis Oct 10, 2026
ee6df13
test(fuzz): image-decode opens files through the shared OpenOrNull
michaelstonis Oct 10, 2026
1ce47b0
Merge remote-tracking branch 'origin/spec/33-broadside-v1' into wrap-…
michaelstonis Oct 10, 2026
0c22053
docs(conformance): honest rows for the filters and images wrap-up
michaelstonis Oct 10, 2026
142166b
feat(parsing): strict mode checks the binary comment line (7.5.2)
michaelstonis Oct 10, 2026
2fd8330
style(filters): order the using directives the earlier scripts added
michaelstonis Oct 10, 2026
d24dc16
test(security): cover SASLprep NFKC in a globalization-enabled test p…
michaelstonis Oct 10, 2026
df67229
Merge remote-tracking branch 'origin/spec/33-broadside-v1' into wrap-…
michaelstonis Oct 10, 2026
3bbe6b1
perf(security): decrypt stream data on first read, once
michaelstonis Oct 10, 2026
69251b7
merge: review fix pass — content and graphics
michaelstonis Oct 10, 2026
99eb776
fix(parsing): reconstruction takes object-stream pairs from the entry…
michaelstonis Oct 10, 2026
f3a8c7c
feat(fonts): non-embedded CIDFonts go through the font resolver chain
michaelstonis Oct 10, 2026
fc41e1d
feat(fonts): read Style, Lang, FD and CIDSet of CIDFont descriptors
michaelstonis Oct 10, 2026
e91ab31
refactor(cos): one KnownNames constant per name for file structure an…
michaelstonis Oct 10, 2026
5895161
merge: review fix pass — filters and images
michaelstonis Oct 10, 2026
fa8339d
docs(adr): ADR 0007 addendum, predefined CMap metadata in the core
michaelstonis Oct 10, 2026
803ee7d
build(core): declare the core package's licence as a file covering MI…
michaelstonis Oct 10, 2026
ebe2058
docs(conformance): fonts rows after the wrap-up fixes
michaelstonis Oct 10, 2026
0716e8a
Merge remote-tracking branch 'origin/spec/33-broadside-v1' into wrap-…
michaelstonis Oct 10, 2026
190a2f1
refactor(parsing): one stream-length resolver instead of a forwarding…
michaelstonis Oct 10, 2026
34fa1af
refactor(security): one Fail helper on SecurityHandlerContext; one di…
michaelstonis Oct 10, 2026
0ec7763
refactor(writing): one chunk-write loop and one deflate helper
michaelstonis Oct 10, 2026
b01b4ba
merge: review fix pass — fonts
michaelstonis Oct 10, 2026
e88c1b8
ci: shard fuzz-smoke over six jobs; check formatting of fuzz and bench
michaelstonis Oct 10, 2026
33686e9
build(package): the core package's licence is MIT plus its third-part…
michaelstonis Oct 10, 2026
50bd85f
test: seal the file-structure, security, writing and object test classes
michaelstonis Oct 10, 2026
3b2a634
Merge remote-tracking branch 'origin/spec/33-broadside-v1' into wrap-…
michaelstonis Oct 10, 2026
e8025ee
Merge remote-tracking branch 'origin/spec/33-broadside-v1' into wrap-…
michaelstonis Oct 10, 2026
239acff
test(content): pdf.js content gate counts the page of auth-event-ef-o…
michaelstonis Oct 10, 2026
d011b2b
merge: review fix pass — file structure, security and CI
michaelstonis Oct 10, 2026
60e068d
fix(content): report an annotation appearance stream without Resources
michaelstonis Oct 10, 2026
a7c274f
test: seal every test class not designed for inheritance
michaelstonis Oct 10, 2026
11055f5
merge: review fix pass — sealed test classes and appearance resources
michaelstonis Oct 10, 2026
39bb5c9
test(fuzz): predictor invariant counts the PNG tag byte for short data
michaelstonis Oct 10, 2026
6964b21
fix(forms): a button value string holding a zero byte reads as Off
michaelstonis Oct 10, 2026
edb5da1
docs(plan): Phase 7 hardening and v1 release tickets
michaelstonis Oct 10, 2026
d27f965
docs(plan): match Phase 7 track summaries to the published tickets
michaelstonis Oct 10, 2026
c7762ea
fix: address Copilot review findings on PR #83
michaelstonis Oct 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
24 changes: 14 additions & 10 deletions .claude/skills/adding-a-benchmark/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,25 @@ description: "Use when a PR touches a hot path (lexer, content interpreter, rast
Two layers:

1. The benchmark. With `[MemoryDiagnoser]` the `Allocated` column must read `-` (0 B) for a hot path. Any number there is a regression, whatever the baseline says. Read it from the console table or from `BenchmarkDotNet.Artifacts/results/<Class>-report-github.md`.
2. A unit test next to the feature that fails the build on regressions, because BenchmarkDotNet only reports. After one warm-up call:
2. A unit test next to the feature that fails the build on regressions, because BenchmarkDotNet only reports. Measure through `Broadside.TestSupport.Allocations.Measure` and put the class in the non-parallel `Heavy` collection:

```csharp
[Fact]
public void Tokenizing_allocates_nothing()
[Collection(HeavyTestCollection.Name)]
public class TokenizerAllocationTests
{
byte[] bytes = Corpus.Bytes("text-standard14.pdf");
RunHotPath(bytes); // warm up: JIT, static init
long before = GC.GetAllocatedBytesForCurrentThread();
RunHotPath(bytes);
Assert.Equal(0, GC.GetAllocatedBytesForCurrentThread() - before);
[Fact]
public void Tokenizing_allocates_nothing()
{
byte[] bytes = Corpus.Bytes("text-standard14.pdf");

long allocated = Allocations.Measure(() => RunHotPath(bytes)); // warm-up, then the cheapest of several calls

Assert.Equal(0, allocated);
}
}
```

Put only the per-item work inside `RunHotPath`; one-time buffers (`ArrayPool<T>` rentals, the output list) are allowed per call, so size the input to make per-token allocations visible.
Never measure one call after a fixed warm-up: under load that is flaky (issue #48), because the per-thread counter also sees unoptimized code still running while the background compiler is starved (tier 0 does not stack-allocate non-escaping objects), `ArrayPool<T>.Shared` arrays trimmed by another test's gen-2 collection, and first-use runtime work. `Measure` warms up, then takes the fewest bytes over several calls with a short pause between them, stopping at zero; a real per-item allocation shows on every call. The `Heavy` collection keeps parallel tests' collections and compilation away from the measurement. Put only the per-item work inside the delegate and create the delegate before the call; one-time buffers (`ArrayPool<T>` rentals, the output list) are allowed per call, so size the input to make per-token allocations visible.

## Running

Expand Down Expand Up @@ -85,5 +89,5 @@ Track 3I (`docs/plan/README.md`) adds a CI job that runs the suite and compares
- [ ] Class in `bench/Broadside.Benchmarks/`, `[MemoryDiagnoser]`, no job attributes
- [ ] Inputs loaded in `[GlobalSetup]`; body is only the hot path; result returned
- [ ] `--job dry` exits 0; `--job short` numbers quoted in the PR
- [ ] `Allocated` reads `-` on hot paths; `GC.GetAllocatedBytesForCurrentThread` test added next to the feature
- [ ] `Allocated` reads `-` on hot paths; an `Allocations.Measure` test in the `Heavy` collection added next to the feature
- [ ] Names stable; any rename called out in the PR body
63 changes: 49 additions & 14 deletions .claude/skills/adding-a-filter/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,65 @@ description: "Use when implementing a stream filter or image codec (FlateDecode,

# Adding a filter

> **The filter contract is defined by issue #38 (Decode streams through filters). When it lands, replace the "Contract" section of this skill with the real signatures from `src/Broadside/Filters/` and `src/Broadside/PublicAPI.Unshipped.txt`.** Until then this is a design brief: it says what the contract must provide and what a filter PR must deliver. It does not spell the methods.

A filter is "a stream encoding named in a stream's `/Filter` entry, and the codec that decodes or encodes it. Image codecs are filters." (`CONTEXT.md`). Filters are an extension point: a public contract in the core with a fully managed default (`CLAUDE.md`, "Hard rules"; ADR 0001).

## Where it lives

- Contract and standard filters: namespace `Broadside.Filters` in `src/Broadside/`. Image codecs (DCT, CCITT, JBIG2, JPX; Phase 2B) implement the same contract, in the same namespace or a sub-namespace per codec.
- Tests: `tests/Broadside.Tests/Filters/`, namespace `Broadside.Tests.Filters`, one class per filter.
- Corpus: `tests/Corpus/<filter>-stream.pdf` (`flate-stream.pdf`, `lzw-stream.pdf`, `ascii85-stream.pdf`, `asciihex-stream.pdf`, `runlength-stream.pdf`, `filter-chain.pdf`, `png-predictor.pdf` exist); the encoder side of each lives in `tests/Corpus/generate.py` (`lzw_encode`, `ascii85_encode`, `png_up_predict`, ...).
- Benchmarks: `bench/Broadside.Benchmarks/<Filter>Benchmarks.cs`. Fuzz: `tests/Broadside.Fuzz/FuzzTargets.cs`, target `filter-<name>`.
- Benchmarks: a `<Filter>Benchmarks` class deriving from `FilterBenchmark` in `bench/Broadside.Benchmarks/FilterBenchmarks.cs` (256 KB of `FilterEncoders.SampleData`, encoded in setup with `tests/Broadside.TestSupport/FilterEncoders.cs`). Allocation proof: `tests/Broadside.Tests/Filters/FilterAllocationTests.cs`. Fuzz: `tests/Broadside.Fuzz/FuzzTargets.cs`, target `filter-<name>`.

## Contract

The contract landed with #38 in `src/Broadside/Filters/` (public surface in `src/Broadside/PublicAPI.Unshipped.txt`):

```csharp
namespace Broadside.Filters;

public interface IStreamFilter
{
CosName Name { get; } // full /Filter name (Table 6), the registry key; never an abbreviation
void Decode(ReadOnlyMemory<byte> encoded, // never empty: the pipeline short-circuits empty data without a diagnostic
IBufferWriter<byte> output,
FilterContext context);
}

public sealed class FilterContext
{
public FilterContext(); // stand-alone: default filters, no document, own diagnostics
public CosDictionary? Parameters { get; init; } // this filter's DecodeParms (values may be references: Resolve them)
public CosDictionary StreamDictionary { get; init; } // the stream's dictionary: Width, Height, BitsPerComponent, ColorSpace, Decode...
public PdfReadingMode ReadingMode { get; init; } // Strict => Report throws
public long MaxDecodedLength { get; init; } // check header-declared sizes against this before allocating
public IReadOnlyList<Diagnostic> Diagnostics { get; }// what was reported through this context
public void Report(string code, DiagnosticSeverity severity, string message); // lenient: record; strict: throw DiagnosticException
public CosObject Resolve(CosObject? value); // indirect references of the document (CosNull outside one)
public ReadOnlyMemory<byte> DecodeStream(CosStream stream); // another stream through the same pipeline (JBIG2Globals)
}

// Registration, per engine (no static registry):
new PdfOptions().UseFilter(IStreamFilter filter); // replaces the default of filter.Name or adds a name; later wins
new PdfOptions().WithMaxDecodedStreamLength(long); // decompression-bomb limit, default PdfOptions.DefaultMaxDecodedStreamLength (1 GiB)

// Consumption:
ReadOnlyMemory<byte> PdfDocument.DecodeStream(CosStream stream);
void PdfDocument.DecodeStream(CosStream stream, IBufferWriter<byte> output);
```

Managed defaults (`sealed`, stateless): `AsciiHexDecodeFilter`, `Ascii85DecodeFilter`, `LzwDecodeFilter`, `FlateDecodeFilter`, `RunLengthDecodeFilter`, listed in internal `FilterRegistry.Defaults`. A Phase 2B codec adds its instance there (one line; registration lines conflict trivially).

## Contract (responsibilities, not signatures)
What the pipeline (internal `StreamDecoder`, one per document) does so a filter does not:

An implementation must be able to:
- reads `Filter`/`DecodeParms` (resolving references), repairs Table 5 deviations with `DecodeParmsInvalid`/`FilterInvalid`, expands the §8.9.7 Table 92 abbreviations (with `FilterAbbreviationNotAllowed` outside inline images), and runs the chain in order;
- applies the §7.4.4.4 predictors (internal `Predictor`) after any filter named `LZWDecode` or `FlateDecode`, including a replacement: a replacement must not apply them itself;
- routes `Crypt` (§7.4.10) to the internal `ICryptFilterHandler` slot (`StreamDecoder.CryptFilter`, set by #42); `Crypt` and abbreviations cannot be registered;
- buffers between stages in pooled memory, truncates at `MaxDecodedLength` with `StreamDecodedLengthExceeded`, stops the chain at an unregistered name with `FilterUnsupported` and returns the data decoded so far;
- converts any exception a filter throws (other than a strict-mode `DiagnosticException`) into `FilterFailed`, keeping what it wrote.

- name the filter as it appears in `/Filter` (§7.4 Table 6) and its inline-image abbreviation (§8.9.7 Table 92: `/Fl`, `/LZW`, `/A85`, `/AHx`, `/RL`, `/CCF`, `/DCT`);
- decode a stream body given its `/DecodeParms` dictionary (§7.4.1; predictor parameters in §7.4.4.4 Table 10, CCITT in Table 11, JBIG2 in Table 12, DCT in Table 13, JPX in §7.4.9, Crypt in §7.4.10) into a caller-provided or pooled buffer, without per-byte or per-row allocation (codecs are a hot path);
- participate in a chain: the `/Filter` array is applied in order on decode (`filter-chain.pdf` is `[/ASCII85Decode /FlateDecode]`), each stage consuming the previous stage's output;
- repair and record in lenient mode: truncated data, a missing EOD marker, a wrong predictor row length produce a `Diagnostic` and the bytes decoded so far; strict mode throws (ADR 0005);
- for image codecs, deliver samples as a planar or interleaved buffer with a declared colour space and bit depth (plan, Track 2B), including the DCT Adobe-marker CMYK/YCCK and JPX colour-space and SMask-in-data cases;
- encode, for the filters the writer uses (Flate, DCT baseline, PNG predictors; Phase 4A). Decode-only filters say so.
Rules for an implementation: keep no state between calls (one instance serves every thread of every document of the engine); write through `IBufferWriter<byte>` in chunks (internal `FilterOutput` ref struct does this for the defaults); report each kind of deviation once per call with the codes in `Parsing/DiagnosticCodes.cs` ("Stream filters" group: `FilterDataInvalid`, `FilterDataTruncated`, ...); in lenient mode write what can be decoded and return.

Registration goes through the options object: `PdfOptions.UseFilter(...)` (plan row 1.12; `Use*` selects an implementation, `CLAUDE.md` "Code conventions") replaces or adds a filter for one engine instance. There is no static registry: a consumer must be able to run two engines with different filter sets in one process, and tests must be able to inject a fake.
Image codecs (Phase 2B): read the image entries from `StreamDictionary`, resolve auxiliary streams with `Resolve` and decode them with `DecodeStream`, size-check against `MaxDecodedLength` before allocating, and write the §8.9.3 sample layout so a codec behaves like any filter in a chain. Codec metadata (DCT transform, JPX components and colour, alpha) is #60's optional image facet: a second interface the four codecs implement in addition to `IStreamFilter`, used when the codec is last in the chain. Encoding (Flate, DCT baseline, PNG predictors; Phase 4A) will be a separate interface, so decode-only filters need not change.

## Managed default

Expand All @@ -46,11 +82,10 @@ Every filter the PDF file format depends on ships in the core, written in C#. Al

## Worked example: LZWDecode

`tests/Corpus/lzw-stream.pdf` holds a content stream encoded by `lzw_encode` in `generate.py` (9–12-bit codes, clear code 256 first, EOD 257 last, `EarlyChange` 1). The decoder lives in `Broadside.Filters`, cites `<remarks>ISO 32000-2 §7.4.4.2.</remarks>`, handles `/EarlyChange 0` from `/DecodeParms` (Table 8), and then the TIFF and PNG predictors from §7.4.4.4 run as a second stage shared with Flate. Tests: the Table 7 sequence `45 45 45 45 45 65 45 45 45 66` decodes from `80 0B 60 50 22 0C 0C 85 01` (the known answer `self_test()` in `generate.py` already checks for the encoder); `lzw-stream.pdf` decodes to the bytes `pdftotext` shows (`LZWDecode`); a truncated body yields a diagnostic in lenient mode and throws in strict mode. Fuzz target `filter-lzw`, benchmark `LzwBenchmarks.Decode` over the corpus stream, row `7.4.4` done with those tests named.
`tests/Corpus/lzw-stream.pdf` holds a content stream encoded by `lzw_encode` in `generate.py` (9–12-bit codes, clear code 256 first, EOD 257 last, `EarlyChange` 1). The decoder lives in `Broadside.Filters`, cites `<remarks>ISO 32000-2 §7.4.4.2.</remarks>`, handles `/EarlyChange 0` from `/DecodeParms` (Table 8), and then the TIFF and PNG predictors from §7.4.4.4 run as a second stage shared with Flate. Tests: the Table 7 sequence `45 45 45 45 45 65 45 45 45 66` decodes from `80 0B 60 50 22 0C 0C 85 01` (the known answer `self_test()` in `generate.py` already checks for the encoder); `lzw-stream.pdf` decodes to the bytes `pdftotext` shows (`LZWDecode`); a truncated body yields a diagnostic in lenient mode and throws in strict mode. Fuzz target `filter-lzw`, benchmark `LzwBenchmarks.Decode`, row `7.4.4` done with those tests named.

## Checklist

- [ ] Contract section of this skill replaced with the real signatures once #38 has landed
- [ ] Implementation in `Broadside.Filters`, managed only, `sealed`, clause-cited XML docs
- [ ] Registered through `PdfOptions`, not a static registry
- [ ] Lenient repairs recorded as `Diagnostic`; strict mode throws
Expand Down
Loading
Loading