Hi everyone! 👋
I'm excited to share MD2PDF, a free, open-source tool designed to convert Markdown documents (especially those generated by LLMs like ChatGPT, Perplexity, Claude, etc.) into beautifully formatted, PDFs optimized for e-readers including Kindle, Kobo, PocketBook, and tablets.
🌐 Live Demo:
Test all features instantly:
https://md2pdf-brixia.streamlit.app/
✨ Key Features
Batch Processing: Upload and combine multiple .md files in one go.
Smart Reordering: Easily organize chapters and sections with drag-and-drop and checkboxes.
Professional Formatting: Uses the Eisvogel LaTeX template for publication-level styling and readability.
Enhanced Code Support: Clean gray backgrounds, syntax highlighting, and line numbers for code blocks.
Custom Title Pages: Easily add a branded, professional title page with custom backgrounds.
Advanced PDF Settings: Configure fonts, sizes, page margins, and metadata; supports clickable links and cross-references.
E-reader Optimization: Output is tuned for e-ink devices and tablets—ideal for on-the-go or long-form reading.
Flexible Deployment: Run locally, via Docker, on Streamlit Cloud, or deploy to Fly.io for production.
Reliability: Robust LaTeX and Pandoc backend ensures maximum compatibility and consistent output.
Preserves ASCII Art and technical formatting.
🛠️ How It Works
Upload Markdown files from AI tools and note apps (Obsidian, Perplexity, ChatGPT, etc.).
Organize chapters/sections as you wish.
Customize layout (fonts, margins, title page, contents).
Convert—generate your professional-grade PDF for reading on Kindle, Kobo, and more.
🎯 Who is it for?
Researchers and students compiling AI-generated content
Knowledge workers reading technical materials offline
Anyone turning Markdown notes into professional reports or e-reader documents
Developers and writers looking for LaTeX-quality PDFs with minimal hassle
⚡ Quickstart
GitHub:
https://github.com/XrayFinanceDEV/md2pdf
Docker:
text
docker build -t md2pdf .
docker run -p 8501:8501 md2pdf
Local:
text
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
streamlit run app.py
Production: Deploy on Fly.io (auto-scaling, HTTPS, full LaTeX support)
🔧 Technical Details
Stack: Python (Streamlit), Pandoc, Eisvogel LaTeX template
Requirements: Python ≥3.9, Pandoc, XeLaTeX, Liberation fonts (auto-handled in Docker)
Customization: Document metadata, professional title page, table of contents, advanced code formatting
🆘 Troubleshooting
Handles LaTeX and font compatibility issues automatically.
In-depth docs and deployment tips in the GitHub README.
🤝 Contributing
Open to community feedback and PRs—suggest features or report issues directly on GitHub!
Has anyone else struggled with preparing AI research or notes for reading on e-reader devices? What features would you find most useful?
Excited to hear your ideas and feedback!
Made with ❤️ using Streamlit, Pandoc, and Eisvogel.
GitHub:
https://github.com/XrayFinanceDEV/md2pdf