Release v1.0.3
What's Changed
License Improvements
- Removed PyMuPDF (fitz) Dependency: Replaced PyMuPDF (AGPL-3.0) with Poppler for PDF parsing and rendering, maintaining pdf-craft's MIT license compatibility
- pdf-craft now uses Poppler via
pdf2image(MIT) for all PDF operations - This change ensures the entire project remains under the permissive MIT license
- pdf-craft now uses Poppler via
New Features
- Custom PDF Handler Support: Added
pdf_handlerparameter topredownload_models(),transform_markdown(), andtransform_epub()functions, allowing users to customize PDF rendering implementation - Poppler Integration: Migrated to Poppler (via
pdf2image) for PDF parsing and rendering, providing better compatibility and control - New Public APIs: Exported
PDFHandler,PDFDocument,DefaultPDFHandler, andDefaultPDFDocumentfor advanced customization - RENDERED Event: Added
OCREventKind.RENDEREDevent to track PDF page rendering progress
Breaking Changes
⚠️ Parameter Renamed: ignore_fitz_errors → ignore_pdf_errors
- Update your code:
transform_markdown(..., ignore_pdf_errors=True)instead ofignore_fitz_errors=True - Update your code:
transform_epub(..., ignore_pdf_errors=True)instead ofignore_fitz_errors=True
⚠️ Exception Renamed: FitzError → PDFError
- Update your exception handling code accordingly
Dependencies
- New Requirement: Poppler must be installed separately for PDF parsing
- Ubuntu/Debian:
sudo apt-get install poppler-utils - macOS:
brew install poppler - Windows: Download from oschwartz10612/poppler-windows
- See Installation Guide for details
- Ubuntu/Debian:
Bug Fixes
- Upgraded doc-page-extractor to fix bugs (#280)
Migration Guide
If you're upgrading from v1.0.2, please:
- Install Poppler following the Installation Guide
- Update parameter names in your code:
# Before (v1.0.2) transform_markdown(..., ignore_fitz_errors=True) # After (v1.0.3) transform_markdown(..., ignore_pdf_errors=True)
- Update exception handling if you catch
FitzError:# Before (v1.0.2) from pdf_craft import FitzError # After (v1.0.3) from pdf_craft import PDFError
Full Changelog
Full Changelog: v1.0.2...v1.0.3