Implement born-digital PDF text extraction #13
Labels
No labels
area/deployment
area/governance
area/metadata
area/pipeline
area/search
type/data
type/design
type/implementation
type/testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Reference
Arkive/arkive#13
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Record the selected library and version in project dependencies and transformation metadata.
Implement the processing-adapter contract for born-digital PDFs.
Extract text while preserving page boundaries or equivalent page references required for citation.
Preserve original source and document identity and transformation lineage.
Define deterministic serialization and ordering of extracted page content.
Detect and clearly reject scanned PDFs without usable text, malformed PDFs, encrypted PDFs, and unsupported cases.
Add tests using the legally redistributable pilot PDFs and purpose-built failure fixtures.
Document known extraction limitations without silently repairing source meaning.
Layout reconstruction intended to reproduce the visual PDF.
Table understanding, image extraction, or figure interpretation.
Text normalization or chunk generation.
Support for every PDF producer or malformed file.
#12 — Define the processing-adapter contract and implement UTF-8 plain-text ingestion
The extraction library and version are recorded.
Transformation metadata links the extraction to the correct document.
Scanned, malformed, encrypted, and otherwise unsupported PDFs fail clearly.
Repeated extraction of unchanged files produces identical serialized output.
No original PDF is modified.
Extract every approved pilot PDF and manually compare representative passages and page boundaries to the originals.
Exercise scanned/no-text, malformed, encrypted, and unsupported PDF fixtures.
Repeat extraction and compare outputs.
PDF tooling discovered during Issue #10
During selection and review of the five-document pilot corpus, the following external PDF tools were used successfully:
qpdf:
qpdf --check;Poppler utilities:
pdfinfofor document metadata and page information;pdftotextfor text-extraction inspection;pdffontsfor embedded-font review;pdfimagesfor image inventory;pdftoppmfor deterministic page rendering during manual review.Issue #13 should explicitly evaluate and record whether these tools are:
The implementation should also:
No PDF tooling should be introduced as part of Issue #11 because PDF extraction is explicitly outside that issue's scope.
Issue #13 is complete.
PR #58 implemented deterministic born-digital PDF text extraction on top of the existing approved-file verification and processing-adapter boundaries.
Completed requirements include:
pypdf==6.15.0as the production PDF extractor;Final validation passed with 142 unit tests, metadata validation, Ruff lint/format checks,
git diff --check,pip check, deterministic all-three-pilot extraction, qpdf structural checks, and independent Poppler passage/page-boundary comparison.Closing Issue #13 as completed.