Skip to content
プロジェクト

概要

プライバシーを重視したMarkdownからPDFへの変換ツールです。すべてブラウザー内で動作し、オフラインでも使えます。

セキュリティ・プライバシー

この数値の測り方

計測したスター増加

24時間
0
7日間
+5
15日間
+5
1か月
+10

期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。

CI Verification Deploy GitHub Pages License: MIT

Markdown2PDF (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.

md2pdf split-pane Markdown editor and live PDF preview

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 .md resumes, 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)

  1. Open https://realdennis.github.io/md2pdf/ (Chrome recommended).
  2. Click Choose (or drag and drop) to load a local .md file, or edit directly in the left pane.
  3. Drag the center divider to resize the layout if needed.
  4. Click Transform to open the browser print dialog.
  5. 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 smoke verifies relative ./ asset paths in ./build/index.html, serves ./build over 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:alpine build (with NODE_OPTIONS=--openssl-legacy-provider configured inside Dockerfile).
  • Customize the exposed port in docker-compose.yaml.

MIT License © 2019–present realdennis — see LICENSE.

関連プロジェクトを探す

読み込み中…