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

This release adds support for GitHub-Flavored Markdown (GFM) table rendering, enhances error handling for interruption scenarios, and includes important bug fixes and dependency updates.

What's Changed

Features

  • GFM Table Support: Added intelligent conversion of HTML tables to GitHub-Flavored Markdown format in https://github.com/oomol-lab/pdf-craft/pull/345
  • Simple tables are automatically converted to clean GFM pipe table syntax
  • Complex tables (with colspan, rowspan, or multiple tbody sections) gracefully fall back to HTML format to preserve structure
  • Prevents data loss from unsupported table features in GFM format
  • Added comprehensive test coverage for various table scenarios
  • New dependency: markdownify library for table conversion

  • Enhanced InterruptedError API: Added public properties to InterruptedError for better error introspection in https://github.com/oomol-lab/pdf-craft/pull/346

  • New kind property exposes the interruption type (abort or token limit exceeded)
  • New metering property provides direct access to OCR token usage data
  • OCRTokensMetering is now exported from the public API for convenience
  • Enables users to programmatically handle different interruption scenarios and track resource consumption

Bug Fixes

  • Fixed Error Propagation: Corrected handling of critical error types during page extraction in https://github.com/oomol-lab/pdf-craft/pull/343
  • AbortError and TokenLimitError now propagate correctly instead of being wrapped in OCRError
  • Ensures interruption signals are properly received and handled by calling code
  • Prevents masking of user-initiated abort operations and token limit violations

Dependencies

Migration Notes

InterruptedError Changes

If you're catching InterruptedError exceptions, you can now access detailed information about the interruption:

:::python
from pdf_craft import transform_markdown, InterruptedError, InterruptedKind

try:
    transform_markdown(
        pdf_path="input.pdf",
        markdown_path="output.md",
    )
except InterruptedError as error:
    # New in v1.0.11: Access interruption details
    if error.kind == InterruptedKind.ABORT:
        print("User aborted the operation")
    elif error.kind == InterruptedKind.TOKEN_LIMIT_EXCEEDED:
        print(f"Token limit exceeded: {error.metering.input_tokens} input tokens used")

    # Access token usage statistics
    print(f"Total tokens: {error.metering.input_tokens + error.metering.output_tokens}")

Table Rendering

Tables in your PDF documents will now be converted to GFM format when possible, making them more readable in markdown viewers. Complex tables will automatically fall back to HTML to preserve their structure.

Full Changelog: https://github.com/oomol-lab/pdf-craft/compare/v1.0.10...v1.0.11

Source: README.md, updated 2026-02-07