Download Latest Version v2.6.7 source code.zip (25.8 MB)
Home / v1.0.8
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2026-01-14 2.4 kB
v1.0.8 source code.tar.gz 2026-01-14 14.7 MB
v1.0.8 source code.zip 2026-01-14 14.7 MB
Totals: 3 Items   29.4 MB 0

This release brings enhanced error handling flexibility, improved OCR text quality, and important security fixes.

What's Changed

Features

Security

Other

Example Usage

Custom Error Handling with Functions

:::python
from pdf_craft import transform_markdown, OCRError

def should_ignore_ocr_error(error: OCRError) -> bool:
    # Only ignore specific types of OCR errors
    return error.kind == "recognition_failed"

transform_markdown(
    pdf_path="input.pdf",
    markdown_path="output.md",
    ignore_ocr_errors=should_ignore_ocr_error,  # Pass custom function
)

Traditional Boolean Error Handling (Still Supported)

:::python
from pdf_craft import transform_markdown

transform_markdown(
    pdf_path="input.pdf",
    markdown_path="output.md",
    ignore_ocr_errors=True,  # Simple boolean flag
)

API Changes

The following parameters have been enhanced to accept both boolean values and callable functions:

  • ignore_pdf_errors: bool | Callable[[PDFError], bool]
  • ignore_ocr_errors: bool | Callable[[OCRError], bool]

This change is fully backward compatible - existing code using boolean values will continue to work without modifications.

Full Changelog: https://github.com/oomol-lab/pdf-craft/compare/v1.0.7...v1.0.8

Source: README.md, updated 2026-01-14