realdennis/md2pdf
À propos
Un convertisseur Markdown vers PDF qui privilégie la confidentialité et fonctionne entièrement dans le navigateur, même hors ligne.
Sécurité et confidentialitéProgression mesurée des étoiles
- in 24h
- 0
- in 7 days
- +5
- in 15 days
- +5
- in 1 month
- +10
Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.
README.md
OriginalMarkdown2PDF (md2pdf)
English | 简体中文(Simplified Chinese) | 繁體中文(Traditional Chinese)
Live Web App: https://realdennis.github.io/md2pdf/
Convert Markdown files to clean PDFs completely offline in your browser—no backend uploads, no account required, and zero third-party tracking of your documents.

Why md2pdf? (Privacy-First Architecture)
- 100% Client-Side Execution: Markdown parsing, syntax highlighting, and print layout run locally in your browser tab.
- Zero Server Uploads: Your
.mdresumes, notes, and docs never leave your machine. - Live Split-Pane Editing: Resizable CodeMirror editor with GitHub-flavored Markdown preview and inline HTML support.
- PWA / Offline Ready: Cached static bundle loads cleanly even without an active connection after first visit.
flowchart LR
A["Local .md File / Editor"] --> B["Browser Parser (Remarkable + highlight.js)"]
B --> C["Live Styled Preview"]
C --> D["Browser Print -> Save as PDF"]
Quick Start (Web App)
- Open https://realdennis.github.io/md2pdf/ (Chrome recommended).
- Click Choose (or drag and drop) to load a local
.mdfile, or edit directly in the left pane. - Drag the center divider to resize the layout if needed.
- Click Transform to open the browser print dialog.
- Set Destination to Save as PDF and uncheck Headers and Footers (反選頁首與頁尾).
Tips
- Embed inline styled HTML tags (for example
<span style="color:#0984e3">text</span>or<blockquote>) directly in Markdown. - Adjust browser margins and background graphics inside Chrome Print settings for custom spacing.
Local Development & Verification
Requires Node.js 20 LTS (or Node 18+/22+) and Yarn 1.x.
Because Webpack 4 ([email protected]) uses legacy OpenSSL hashing on Node 17+, export NODE_OPTIONS=--openssl-legacy-provider before building:
yarn install --frozen-lockfile
CI=true NODE_OPTIONS=--openssl-legacy-provider yarn test --watchAll=false
NODE_OPTIONS=--openssl-legacy-provider yarn build
yarn smoke
- Start the local dev server:
NODE_OPTIONS=--openssl-legacy-provider yarn start yarn smokeverifies relative./asset paths in./build/index.html, serves./buildover localhost HTTP, and renders the app in headless Chrome.
Self-Hosting with Docker
Run a local nginx instance on port 8080:
docker compose up -d
- Uses a multi-stage
node:20-alpine->nginx:alpinebuild (withNODE_OPTIONS=--openssl-legacy-providerconfigured insideDockerfile). - Customize the exposed port in
docker-compose.yaml.
MIT License © 2019–present realdennis — see LICENSE.
Explorer des projets similaires
Chargement…