A professional desktop application for converting Markdown documents to beautifully styled PDFs. Perfect for creating client-ready documents with a clean, professional appearance.
- Dual Input Methods: Upload
.mdfiles or paste markdown text directly - Live Preview: See exactly how your PDF will look before converting
- Professional Styling: Clean, modern design optimized for business documents
- Easy File Management: Built-in file explorer for saving PDFs
- Cross-Platform: Works on Windows, macOS, and Linux
- Node.js (v14 or higher)
- npm (comes with Node.js)
- Clone or download this repository
- Navigate to the project directory
- Install dependencies:
npm install
To run the application in development mode:
npm startTo create a desktop executable for your platform:
Windows (Recommended method):
npm run package-winThe executable will be created in the dist/markdown-to-pdf-win32-x64 folder. You can find markdown-to-pdf.exe there.
Alternative method (if you have admin privileges):
npm run build-winmacOS:
npm run build-macLinux:
npm run build-linux-
Launch the Application: Double-click the executable or run
npm start -
Input Your Markdown:
- Click "Upload File" to select a
.mdfile from your computer - Or paste/type markdown directly in the input area
- Click "Upload File" to select a
-
Preview: The right panel shows a live preview of how your PDF will look
-
Convert: Click "Convert to PDF" when ready
- A file explorer will open
- Choose where to save your PDF
- Click Save
-
Clear: Use the "Clear" button to reset and start with new content
The converter supports all standard Markdown features:
- Headers (H1-H6)
- Bold and Italic text
- Lists (ordered and unordered)
- Links and images
- Code blocks and inline code
- Blockquotes
- Tables
- Horizontal rules
# Project Proposal
## Executive Summary
This document outlines our **comprehensive solution** for your business needs.
### Key Benefits
1. Increased efficiency
2. Cost reduction
3. Improved user experience
> "This solution has transformed our operations" - Previous Client
### Technical Specifications
| Feature | Description |
|---------|-------------|
| Performance | 99.9% uptime |
| Security | Enterprise-grade |
| Support | 24/7 availability |To customize the PDF styling, edit the CSS in renderer.js within the generatePDFHTML() function.
This application can also be deployed as a web app (like on GitHub Pages). When running in a browser:
- File upload uses the browser's file input dialog
- PDF generation uses the browser's print dialog (select "Save as PDF" as the printer)
- All other features work the same way
Live demo: https://titaniumshovel.github.io/MarkdownToPDF/
- Ensure Node.js is installed:
node --version - Try deleting
node_modulesand runningnpm installagain
- Check that you have write permissions in the save location
- Ensure the markdown content is not empty
- The preview updates automatically after a short delay
- Try clicking outside the input area to trigger an update
Built with:
- Electron: Cross-platform desktop framework
- Marked.js: Markdown parsing
- Native PDF generation: Using Electron's built-in PDF capabilities
MIT License - feel free to use this for personal or commercial projects.
For issues or feature requests, please create an issue in the project repository.