PDF2md - A powerful Python tool that converts PDF files to clean Markdown while perfectly preserving the original structure and layout. Perfect for invoices, letters, and formatted documents!
✨ Perfect for:
- Converting business documents
- Extracting text from PDFs while keeping formatting
- Creating Markdown versions of your PDF files
pip install .pip install git+https://github.com/daMustermann/PDF2md.gitpipx install git+https://github.com/daMustermann/PDF2md.gitgit clone https://github.com/daMustermann/PDF2md.git
cd pdf2markdown
pip install -e .[dev]pdf2md --versionConvert a PDF file to Markdown:
pdf2md input.pdf output.md--debug: Enable debug output (shows processing details)
- ✅ Preserves document structure (headings, lists, tables)
- ✅ Maintains original formatting (bold, italic text)
- ✅ Handles complex documents (invoices, letters, reports)
- ✅ Supports UTF-8 encoding (works with international characters)
- ✅ Lightweight and fast processing
Convert a document:
pdf2md document.pdf document.md- Python 3.6+
- pdfplumber 0.10.0+
Contributions are welcome! Please open an issue or submit a pull request.
MIT