An Impressive Markdown to PDF Converter - Privacy-First, Offline-Capable Web Application
- Online Option: Upload resume.md to an unknown server?
+ Try the Offline Web Application instead!๐ Live Demo โข โจ Features โข ๐ Tech Stack โข ๐ฆ Installation
Markdown2PDF is a powerful, privacy-focused web application that converts Markdown files to beautifully formatted PDF documents entirely in your browser. No server uploads, no data tracking - just pure client-side conversion with real-time preview.
https://markdownd2pdf.vercel.app/
- ๐ File Upload Support - Open and load
.mdfiles directly from your computer - โ๏ธ Live Markdown Editor - Real-time editing with syntax highlighting powered by CodeMirror
- ๐๏ธ Live Preview - See your markdown rendered instantly as you type
- ๐ PDF Export - Convert your markdown to PDF with a single click using the browser's native print functionality
- ๐พ Save Markdown - Save your edited markdown files with smart filename generation based on document headings
- ๐ Privacy First - All processing happens locally in your browser - no server uploads required
- ๐ฑ Responsive Design - Works seamlessly on desktop and mobile devices with adaptive layouts
- ๐ Mermaid Diagrams - Create flowcharts, sequence diagrams, and other visualizations
- ๐งฎ Mathematical Equations - Full KaTeX support for LaTeX math rendering
- ๐ GitHub Flavored Markdown - Tables, task lists, and extended markdown syntax
- ๐ GitHub-Style Alerts - Support for NOTE, TIP, IMPORTANT, WARNING, and CAUTION alerts
- ๐จ Code Syntax Highlighting - Beautiful code blocks with language-specific highlighting
- ๐ Dark Mode Editor - VSCode Dark theme for comfortable editing
- โก Fast Performance - Built with Vite for lightning-fast development and optimized production builds
- ๐ฏ Smart File Naming - Automatically generates filenames from document headings
- ๐ Print-Optimized - Carefully crafted print styles for professional PDF output
- ๐ Modern File Picker - Native browser file system API support (Chrome/Edge) with fallback for other browsers
- โ๏ธ React 18.2 - Modern UI library with hooks and context API
- โก Vite 7.2 - Next-generation frontend build tool for blazing fast development
- ๐จ Tailwind CSS 3.4 - Utility-first CSS framework for rapid UI development
- ๐ง PostCSS - CSS processing with autoprefixer
- ๐ CodeMirror 6 - Powerful code editor component
@uiw/react-codemirror- React wrapper for CodeMirror@codemirror/lang-markdown- Markdown language support with syntax highlighting@codemirror/language-data- Language support for code blocks@uiw/codemirror-themes-all- VSCode Dark theme and other editor themes
- ๐ @uiw/react-markdown-preview - React markdown preview component
- ๐งฎ KaTeX - Fast math typesetting library
rehype-katex- Rehype plugin for KaTeX math renderingremark-math- Remark plugin for parsing math in markdown
- ๐ Mermaid 11.10 - Diagram and flowchart rendering from text
- โ ESLint - Code linting with React-specific rules
- ๐ Prettier - Code formatting with Tailwind CSS plugin
- ๐ PropTypes - Runtime type checking for React props
- Node.js (v16 or higher)
- npm or yarn package manager
-
Fork the Repository
- Click the 'Fork' button on the top right of the GitHub page
-
Clone Your Fork
git clone https://github.com/<your-github-username>/md2pdf.git cd md2pdf
-
Install Dependencies
npm install
-
Start Development Server
npm run dev
The application will be available at
http://localhost:5173 -
Build for Production (Optional)
npm run build
The optimized build will be in the
distdirectory
- ๐ Open a File - Click the "Open" button to select a
.mdfile from your computer - โ๏ธ Edit Content - Use the left panel to edit your markdown with syntax highlighting
- ๐๏ธ Preview - Watch the right panel update in real-time as you type
- ๐พ Save - Click "Save" to download your edited markdown (with smart filename generation)
- ๐ Convert to PDF - Click the "PDF" button and choose 'Destination' as Save as PDF
๐ก Pro Tip: Chrome is recommended for the best PDF export results and native file picker support.
md2pdf-main/
โโโ src/
โ โโโ components/ # React components
โ โ โโโ Header.jsx # App header with actions
โ โ โโโ MdEditorComponent.jsx # CodeMirror editor
โ โ โโโ MdPreviewComponent.jsx # Markdown preview
โ โ โโโ Mermaid.jsx # Mermaid diagram renderer
โ โ โโโ FileInput.jsx # File upload handler
โ โ โโโ PreviewButton.jsx # Preview toggle (mobile)
โ โโโ context/ # React Context for state management
โ โโโ hooks/ # Custom React hooks
โ โโโ pages/ # Page components
โ โโโ utils/ # Utility functions
โ โโโ App.jsx # Main app component
โ โโโ main.jsx # App entry point
โ โโโ global.css # Global styles
โโโ public/ # Static assets
โโโ index.html # HTML template
โโโ tailwind.config.js # Tailwind configuration
โโโ vite.config.js # Vite configuration
โโโ package.json # Project dependencies
| Command | Description |
|---|---|
npm run dev |
Start development server with hot reload |
npm run build |
Build optimized production bundle |
npm run preview |
Preview production build locally |
npm run lint |
Run ESLint to check code quality |
- React provides a component-based architecture for building interactive UIs
- Vite offers instant server start and lightning-fast Hot Module Replacement (HMR)
- Professional-grade code editor with extensive customization
- Excellent performance with large documents
- Built-in markdown syntax support
- Privacy - Your documents never leave your browser
- Offline Capable - Works without an internet connection (after initial load)
- Fast - No server round trips needed
Contributions are welcome! Feel free to:
- ๐ Report bugs
- ๐ก Suggest new features
- ๐ง Submit pull requests
Faizan Gondal
- GitHub: @fazi-gondal
- Project: Markdown2PDF
This project is licensed under the MIT License - feel free to use it for personal or commercial projects.
Made with โค๏ธ by Faizan Gondal
โญ If you find this project useful, please consider giving it a star on GitHub! โญ
