How m1ck4/pdfmd works
pdfmd is a local PDF-to-Markdown converter with CLI and desktop interfaces. Both initiate conversion through the shared pipeline: PDF text is extracted (native or OCR), represented in a page model, cleaned and annotated, then rendered to Markdown; optional image export writes assets alongside the result. The README also documents batch conversion, password-protected PDFs, table reconstruction, math preservation, and GUI profiles. The source index confirms several module references; OCR-tool wiring and some pipeline details are not fully shown, so optional integration edges are marked unverified.
Main entry points: pipeline.py Conversion pipeline · transform.py Text cleanup · extract.py OCR engines · app_gui.py Desktop GUI
Components 15
User interfaces
- Desktop GUI
pdfmd/app_gui.py - Command line
pdfmd/cli.py
Conversion engine
- Conversion pipeline
pdfmd/pipeline.py - PDF extraction
pdfmd/extract.py - Page model
pdfmd/models.py - OCR engines
pdfmd/extract.py
Content processing
- Text cleanup
pdfmd/transform.py - Table detection
pdfmd/tables.py - Math normalization
pdfmd/equations.py - Markdown rendering
pdfmd/render.py
Output
- Markdown file
- Exported images
Other components
- User
- Tesseract
- OCRmyPDF
Connections 15
- User → Desktop GUI: uses
README.md - User → Command line: invokes
README.md - Desktop GUI → Conversion pipeline: runs conversion
pdfmd/app_gui.py - Command line → Conversion pipeline: runs conversion
pdfmd/cli.py - Conversion pipeline → PDF extraction: extracts pages
pdfmd/pipeline.py - PDF extraction → Page model: builds pages
pdfmd/models.py - Conversion pipeline → Text cleanup: transforms pages
pdfmd/pipeline.py - Conversion pipeline → Markdown rendering: renders Markdown
pdfmd/pipeline.py - Text cleanup → Table detection: detects tables
pdfmd/transform.py - Text cleanup → Math normalization: normalizes math
pdfmd/transform.py - Markdown rendering → Text cleanup: uses annotations
pdfmd/render.py - Conversion pipeline → Markdown file: writes output
pdfmd/pipeline.py - Conversion pipeline → Exported images: exports assets
pdfmd/pipeline.py - OCR engines → Tesseract: may invoke
README.md - OCR engines → OCRmyPDF: may invoke
README.md