pdftract/tests/fixtures/PROVENANCE.md
jedarden 39ca6a3552 feat(pdftract-2b7ff): implement image_coverage_fraction signal evaluator
Add image_coverage_fraction signal evaluator that computes the union
image coverage fraction from individual image XObject areas.

- Computes total image coverage as sum of image_xobject_areas
- Divides by page area (width * height) to get coverage fraction
- Clamps to [0.0, 1.0] to handle overlapping images (defensive)
- Returns Some(Vote::scanned(0.85)) if fraction > 0.85

Implementation uses sum for simplicity (overestimates coverage when
images overlap), which is acceptable for the 0.85 threshold as it's
a conservative signal. Can be revisited with Klee's algorithm for
greater accuracy if needed.

Acceptance criteria PASS:
✓ Page with one image covering 90% area → Some(Vote { 0.85, Scanned })
✓ Page with multiple small images totaling 50% → None (below threshold)
✓ Page with no images → None
✓ Coverage clamped to 1.0 on overlapping images

Also includes pre-existing infrastructure:
- tr3_op_count field in PageContext
- image_xobject_areas field in PageContext
- all_tr3_with_full_page_image function
- CharDensityRatioSignal evaluator

These were necessary dependencies for the new evaluator to function.

Refs: Plan section Phase 5.1.2, coordinator pdftract-22p
2026-05-31 23:42:38 -04:00

1.5 KiB

EC-04-rc4-encrypted.pdf

Generated by tests/fixtures/generate_encrypted_fixtures.py PDF 1.7, RC4 encryption (V=1, R=2), 40-bit key, user password: "user40" Generated: 2026-05-28

EC-05-aes128-encrypted.pdf

Generated by tests/fixtures/generate_encrypted_fixtures.py PDF 1.7, AES-128 encryption (V=2, R=3), 128-bit key, user password: "user128" Generated: 2026-05-28

EC-06-aes256-encrypted.pdf

Generated by tests/fixtures/generate_encrypted_fixtures.py PDF 2.0, AES-256 encryption (V=5, R=5), 256-bit key, user password: "user256" Generated: 2026-05-28

EC-empty-password.pdf

Generated by tests/fixtures/generate_encrypted_fixtures.py PDF 1.7, no encryption (control fixture) Generated: 2026-05-28

EC-04-rc4-encrypted.pdf

Generated by tests/fixtures/generate_encrypted_fixtures.py PDF 1.7, RC4 encryption (V=1, R=2), 40-bit key, user password: "user40" Generated: 2026-05-28

EC-05-aes128-encrypted.pdf

Generated by tests/fixtures/generate_encrypted_fixtures.py PDF 1.7, AES-128 encryption (V=2, R=3), 128-bit key, user password: "user128" Generated: 2026-05-28

EC-06-aes256-encrypted.pdf

Generated by tests/fixtures/generate_encrypted_fixtures.py PDF 2.0, AES-256 encryption (V=5, R=5), 256-bit key, user password: "user256" Generated: 2026-05-28

EC-empty-password.pdf

Generated by tests/fixtures/generate_encrypted_fixtures.py PDF 1.7, no encryption (control fixture) Generated: 2026-05-28

sample.pdf

Copied from valid-minimal.pdf for SDK examples default path Minimal valid PDF v1.4 fixture for contract method examples Generated: 2026-05-31