Download Latest Version v2.6.7 source code.zip (25.8 MB)
Home / v1.0.6
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2025-12-22 1.8 kB
v1.0.6 source code.tar.gz 2025-12-22 14.6 MB
v1.0.6 source code.zip 2025-12-22 14.7 MB
Totals: 3 Items   29.3 MB 0

This release brings significant improvements to PDF rendering control, text quality, and error handling capabilities.

What's Changed

Features

  • Flexible DPI Control: Added dpi parameter to control PDF page rendering resolution (default: 300 DPI), allowing you to balance between image quality and file size in https://github.com/oomol-lab/pdf-craft/pull/315

  • Automatic Image Size Optimization: Introduced max_page_image_file_size parameter that automatically adjusts DPI when generated images exceed specified size limits, preventing overly large output files in https://github.com/oomol-lab/pdf-craft/pull/315

  • Resilient OCR Processing: Added ignore_ocr_errors parameter to continue processing when OCR recognition fails on individual pages, instead of stopping the entire conversion in https://github.com/oomol-lab/pdf-craft/pull/314

  • Improved Text Quality: Automatically removes Unicode surrogate characters from OCR-extracted text and PDF metadata (title, authors, publisher, etc.), ensuring cleaner output and better compatibility with downstream tools in https://github.com/oomol-lab/pdf-craft/pull/316

Documentation

Dependencies

  • Updated epub-generator to 0.1.6

Example Usage

:::python
from pdf_craft import transform_markdown

transform_markdown(
    pdf_path="input.pdf",
    markdown_path="output.md",
    dpi=300,  # Control rendering resolution
    max_page_image_file_size=5242880,  # 5MB limit per page
    ignore_ocr_errors=True,  # Continue on OCR failures
)

Full Changelog: https://github.com/oomol-lab/pdf-craft/compare/v1.0.5...v1.0.6

Source: README.md, updated 2025-12-22