PDF Craft
PDF Craft converts scanned PDF books into editable Markdown or reader-friendly EPUB, and translates PDF and EPUB documents, including bilingual output.
Visit oomol-lab/pdf-craftOverview
PDF Craft is a Python library and online service for converting scanned PDF books, research papers, and technical documents into editable Markdown or reader-friendly EPUB. It can also translate PDF and EPUB content, produce translated or bilingual EPUBs, and write translations back onto original PDF pages. It recognizes body text, chapters, tables of contents, footnotes, tables, formulas, and images so content can be searched and edited beyond the scanned page.
Key Features
- Converts scanned PDFs into Markdown with text and image assets.
- Creates EPUB output with book metadata and a table of contents for ebook readers.
- Translates PDF and EPUB documents, with translation-only and bilingual EPUB modes.
- Recognizes body text, chapters, tables of contents, footnotes, tables, formulas, and images.
- Supports remote OCR and local OCR configurations, including DeepSeek OCR, DeepSeek OCR 2, and Unlimited OCR.
- Provides Python APIs and reusable .pcex extraction files for later rendering or translation.
Use Cases
- Read scanned books on a phone or e-reader with adjustable, reflowable text.
- Convert research papers, textbooks, or lecture notes into Markdown for notes and excerpts.
- Translate whole EPUB books and read the translation alongside the original.
- Create translated PDFs by writing translated text back onto source pages.
Getting Started
- Use PDF Craft Online in a browser: upload a PDF, submit a conversion task, and download the result when ready; no Python, CUDA, or OCR provider setup is required.
- For the Python library, install with python -m pip install pdf-craft using Python 3.11–3.13 and Poppler.
- Configure a DeepSeek OCR-compatible service, then call craft.convert_pdf_to_markdown("input.pdf", "output.md") for Markdown or craft.convert_pdf_to_epub("input.pdf", "output.epub") for EPUB.
Deployment & Requirements
- Online conversion requires only a browser; no Python installation or OCR service setup.
- Python with remote OCR requires Python, Poppler, a compatible OCR service URL, and credentials.
- Python with local OCR requires an NVIDIA GPU, CUDA, sufficient VRAM, and model files, plus the pdf-craft[local] extra.
- Creating a translated PDF also requires Ghostscript and suitable local fonts.
Before You Adopt
- License: MIT. Review its terms before using, modifying, or distributing the project.
- Remote OCR depends on a configured external OCR service and credentials, and sends document pages to that service.
- Even with local OCR, using a remote LLM for translation or table-of-contents analysis sends the corresponding content to that service.
- Output quality depends on scan quality, page layout, and the OCR model, so a representative document should be checked before batch processing.
- Online conversion cost is based on page count and selected processing mode.
- Online processing time can vary with document size, layout complexity, and server traffic.