| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| pdf_craft-2.3.0-py3-none-any.whl | 2026-09-16 | 292.1 kB | |
| pdf_craft-2.3.0-py3-none-any.whl.publish.attestation | 2026-09-16 | 9.7 kB | |
| pdf_craft-2.3.0.tar.gz | 2026-09-16 | 234.5 kB | |
| pdf_craft-2.3.0.tar.gz.publish.attestation | 2026-09-16 | 9.7 kB | |
| README.md | 2026-09-16 | 4.9 kB | |
| v2.3.0 source code.tar.gz | 2026-09-16 | 23.4 MB | |
| v2.3.0 source code.zip | 2026-09-16 | 23.5 MB | |
| Totals: 7 Items | 47.4 MB | 0 | |
PDF Craft v2.3.0
What's Changed
Richer PCEX document flow
- Upgrade PCEX chapters to a v3 FlowItem-based document flow. A text flow now preserves its source fragments together with image/table assets anchored inside that flow, while display formulas remain explicit reading-flow boundaries.
- Canonical writers now emit PCEX format v3. Readers retain migration support for v1 and v2 archives.
- Render anchored images and tables in Markdown and EPUB in reading order. EPUB uses a conservative responsive float only when source geometry provides strong side-by-side evidence; otherwise assets remain normal block content.
- Translate image/table title, content, and caption fields through a separate anchored-content stage, so they do not pollute NarrativeFlow translation context.
Page furniture and printed contents
- Add
ExtractionOptions.includes_furniture(defaultFalse) to opt into extraction of native PDF page furniture intofurnitures.xml. It identifies recurring Universal and SameSide patterns, retains unmatched page-local sections, and supports common running heads, footers, and folios. - Add
PDFCraft.translate_furnitures()and itsFurnitureTransformercontract as a separate page-furniture translation stage. Translation coverage is recorded intranslation.xml, allowing translated furniture to be patched back onto PDF pages without entering the main narrative translation flow. - Connect printed table-of-contents pages, body headings, and matching furniture sections through TOC identities so repeated chapter titles can share a translation.
More reliable PDF translation output
- Refine two-stage PDF text fitting, including normalization for isolated single-line source boxes whose OCR height is not a reliable font-size signal.
- Keep anchored image/table positions out of PDF text fitting: source text fragments in one TextFlowItem remain one continuous PDF text flow while the source artwork stays in the visual base.
- Introduce read-only logical text projections for PCEX flows, shared by Narrative translation, PDF patching, Markdown, EPUB, and anchored-content context.
- Preserve the canonical first-stage translation through XML fill. Fragment and anchor slots can no longer introduce visible spaces or split continuous text in PDF output, including cross-page fragment boundaries.
Optional OCR-derived book metadata
- Add
ExtractionOptions.extract_book_metadata(defaultFalse) and its required, independentmetadata_llmto enable front-page OCR metadata extraction for PDF-to-EPUB and reusable PCEX workflows. The metadata agent begins with three OCR pages and may inspect up to twelve front pages when more evidence is needed. - Validate metadata JSON through the existing repair loop and retain only page-evidenced fields. Native PDF Info is used only to fill OCR-missing metadata.
- Extend PCEX manifests with richer bibliographic metadata, including original names, publication details, subjects, and rights.
New public PCEX operations and members
- Add
PDFCraft.translate_anchored_contents()and itsAnchoredContentTransformercontract for a separate image/table text translation stage. - PCEX v3 archives can contain optional
furnitures.xmlandtranslation.xmlmembers. The latter recordstranslated/preservedcoverage for Narrative, furniture, and extracted image/table text, so a PDF patch only replaces text that has actually been translated. - The expanded
manifest.jsondocumentobject now recordsoriginal_title, structured authororiginal_name/nationality,publication_date,edition,subjects, andrights.
Documentation
- Refresh English and Chinese PDF translation and PCEX documentation.
- Add localized README files and updated product screenshots.
Breaking change
- Remove callback-based PDF translation (
Callable[[str], str]). Translate a PCEX with a structured chapter transformer, then patch the resulting extraction withPDFCraft.patch_pdf_with_extraction();PDFCraft.translate_pdf()now accepts only a structured chapter transformer.
Selected Pull Requests
Full Changelog: https://github.com/oomol-lab/pdf-craft/compare/v2.2.1...v2.3.0