Download Latest Version v2.6.7 source code.zip (25.8 MB)
Home / v2.4.2
Name Modified Size InfoDownloads / Week
Parent folder
pdf_craft-2.4.2-py3-none-any.whl 2026-10-12 371.4 kB
pdf_craft-2.4.2-py3-none-any.whl.publish.attestation 2026-10-12 9.7 kB
pdf_craft-2.4.2.tar.gz 2026-10-12 306.0 kB
pdf_craft-2.4.2.tar.gz.publish.attestation 2026-10-12 9.8 kB
README.md 2026-10-12 2.6 kB
v2.4.2 source code.tar.gz 2026-10-12 23.5 MB
v2.4.2 source code.zip 2026-10-12 23.7 MB
Totals: 7 Items   48.0 MB 0

PDF Craft v2.4.2

PDF Craft 2.4.2 fixes OCR-based document metadata extraction and unifies business execution around async implementations. PDFCraft remains the synchronous facade over AsyncPDFCraft.

OCR metadata extraction

Book metadata extraction now awaits the guaranteed JSON repair loop and LLM runtime throughout the request chain. This fixes the blocking guaranteed JSON request returned an awaitable error and the unawaited-coroutine warning that caused extraction to fall back to native PDF metadata. When a PDF has no native title, a supported title from the OCR response can now reach document.title in the exported PCEX.

A regression test exercises the actual LLM runtime with a simulated network response and verifies that Attention Is All You Need reaches the PCEX manifest when native metadata is empty.

See #503.

Async execution and extension contracts

  • LLM requests, JSON/XML repair loops, translation, and executable extensions use async contracts. LLM configuration remains declarative; tokenizer and prompt resources are loaded through the async runtime.
  • PDF patching prepares extraction content and runs Ghostscript asynchronously, with native Qt composition isolated in a worker process. Custom PDF handlers and visual compilers execute on the caller's event loop.
  • Markdown and EPUB rendering use async orchestration. Filesystem operations and synchronous third-party generation remain in dedicated execution domains.
  • OCR metadata and table-of-contents file scans run outside the event-loop thread.
  • Cancellation cleans temporary resources and cancels pending async fill-recovery callbacks. Fill-recovery callbacks run on the caller's event loop.

Public API

  • Await PDFTranslationPipeline.patch(), PDFPatcher.patch(), and GhostscriptVisualBaseCompiler.compile().
  • Custom PDF providers implement AsyncPDFHandler and AsyncPDFDocument; custom visual compilers implement async def compile(source_path, target_path).
  • Model download uses await predownload_models(...) or await AsyncPDFCraft().predownload_models(...). Synchronous applications use PDFCraft().predownload_models(...).
  • The package's public PDF provider contracts are AsyncPDFHandler and AsyncPDFDocument. Native synchronous PDF adapters are internal implementation details.

The API references and installation guides describe these execution contracts.

Full Changelog: https://github.com/oomol-lab/pdf-craft/compare/v2.4.1...v2.4.2

Source: README.md, updated 2026-10-12