pdftract/tests/fixtures/profiles
jedarden 1dfaf73aa4
Some checks are pending
Schema Generation Validation / Validate JSON Schema (push) Waiting to run
Schema Generation Validation / Validate JSON Syntax (push) Waiting to run
feat(pdftract-3g6ne): implement CMap codespace range parser
This commit adds the codespace range parser for CMap streams. The parser
extracts the begincodespacerange / endcodespacerange blocks that define
legal byte-width boundaries for character codes in a CMap.

## Implementation

- CodespaceRange: Single range with lo/hi bounds (stored as [u8; 4]) and width (1-4 bytes)
- CodespaceRanges: Collection with SmallVec<[CodespaceRange; 8]>
- CodespaceParser: PostScript-style tokenizer for begincodespacerange blocks

## Acceptance Criteria (all PASS)

- Parse <00> <7F> → 1 range, width=1 
- Parse <00> <7F> <8000> <FFFF> in one block → 2 ranges 
- Width inference: 2-char hex → width=1; 4-char hex → width=2 
- Case-insensitive hex (<C0> and <c0> equivalent) 
- Malformed range (width mismatch) → diagnostic + skipped 
- Empty CMap → empty ranges 
- JIS range <8140> <FEFE> → 2-byte CJK 
- 3-byte and 4-byte range support 

Also adds encrypted fixture provenance entries to PROVENANCE.md.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-05-28 05:47:07 -04:00
..
book_chapter feat(pdftract-1t5sj): implement book_chapter profile with fixtures and tests 2026-05-27 22:30:09 -04:00
contract feat(pdftract-dtpwa): implement contract profile per Phase 7.10 schema 2026-05-24 07:10:32 -04:00
form fix: resolve compilation errors across codebase 2026-05-25 08:38:04 -04:00
legal_filing feat(pdftract-260a3): implement legal_filing profile with fixtures and tests 2026-05-27 21:44:49 -04:00
scientific_paper feat(pdftract-2vajs): implement slide_deck profile with fixtures and tests 2026-05-27 21:12:24 -04:00
slide_deck feat(pdftract-2vajs): implement slide_deck profile with fixtures and tests 2026-05-27 21:12:24 -04:00
PROVENANCE.md feat(pdftract-3g6ne): implement CMap codespace range parser 2026-05-28 05:47:07 -04:00