A simple utility that converts PDF documents to markdown text using Docling.
- Download the latest release for your operating system from the Releases page
- Open your terminal/command prompt and use the tool:
# Convert and print to console
pdf2md input.pdf
# Save to file
pdf2md input.pdf -o output.md
# Convert from URL
pdf2md https://example.com/document.pdf -o output.md
- Clone this repository:
git clone https://github.com/your-username/pdf-to-markdown-converter.git
cd pdf-to-markdown-converter
- Create a virtual environment (recommended):
python -m venv venv
source venv/bin/activate # On Windows use: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Build the executable:
python build.py
The executable will be created in the dist
directory.
from pdf_to_markdown import PdfToMarkdown
converter = PdfToMarkdown()
result = converter.convert("input.pdf")
if result:
print(result)
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.