你的 Markdown,
变成可打印的 PDF。
粘贴 Markdown、拖入文件,或获取公开 GitHub README。md2pdf 用你选择的打印主题排版,并打开浏览器的 PDF 对话框——全部在你的设备上完成。
# React []()
React is a JavaScript library for building
user interfaces.
## Installation
```bash
npm install react react-dom
```
## Features
| Feature | Client-Side | Server |
|---------|:-----------:|:------:|
| Components | Yes | Yes |
| Hooks | Yes | Yes |
| Suspense | Yes | Yes | React
React is a JavaScript library for building user interfaces.
Installation
$ npm install react react-dom Features
| Feature | Client | Server |
|---|---|---|
| Components | ✓ | ✓ |
| Hooks | ✓ | ✓ |
转换器
三种输入方式——仓库 URL、Markdown 文件或键盘输入。预览即成品。
1 · GitHub 仓库 URL
拉取 README(尝试 main/master 及大小写变体),解析相对路径图片与徽章,并在下方渲染。不支持私有仓库。
2 · ……或粘贴 / 上传 Markdown
3 · 打印主题
深色主题在屏幕上易读,打印效果却较差——我们会自动将其调亮,以适配打印和 PDF。
4 · 选项
导出使用浏览器的“打印为 PDF”功能(100% 在本地完成)。请在打印对话框中选择“另存为 PDF”。
文档册
指向一个仓库,选择需要汇编的 Markdown 文件,即可打印成一本分页文档——包含封面、总目录,以及按你设定顺序排列的每一章。
1 · 仓库
查找 README 以及 .md、.markdown 和 .mdown 文件,包括子文件夹中的文件。每本文档册最多包含 30 个文件;仅支持公开仓库。
列表说明
2 · Markdown 文件
尚未扫描任何仓库。
3 · 文档册信息
4 · 打印主题
5 · 章节
打印顺序与此列表一致。使用箭头按钮调整章节顺序,或点击 × 将其移除。
扫描后,章节将显示在此处。
部分文件无法加载
6 · PDF 导出
为每个已构建的章节生成一个 PDF,并打包成 ZIP 压缩包。全部处理都在浏览器中完成,不会上传任何内容。
每个 ZIP 最多 30 个 PDF,大小不超过 128 MB。
部分内容已简化:不支持的字符显示为 ?,无法访问的图片将被跳过。
在下载开始前,请保持此标签页打开。
导出时跳过的文件
每个章节都会在 ZIP 中成为独立的 PDF,并保留其文件夹路径。
只有当所有已选章节都加载完成后,文档册才能打印。导出使用浏览器的“打印为 PDF”功能——请在对话框中选择“另存为 PDF”。
Engineered for Technical Accuracy
From GitHub URL parsing to embedded CJK font rendering, every stage is built for zero data leakage, high print fidelity, and deterministic output.
Deep GitHub Auto-Discovery
Accepts any GitHub URL format: full repo links, subfolder paths, tree views, blob files, or raw URLs. Automatically queries the GitHub API, probes 10 standard README filenames, and rewrites relative images and links to raw GitHub content.
100% Client-Side Privacy
No login, no user accounts, and zero application backend. All markdown parsing, HTML sanitization via DOMPurify, and PDF compilation run entirely in browser memory.
Multi-Chapter Doc Books
Scan entire repositories via Git Trees API. Select up to 30 markdown files with tri-state directory checkboxes, reorder chapters, and generate automated cover pages and tables of contents.
Multilingual Font Embedding
PDFs embed standalone TTF fonts directly in output files. Full typography support for Latin, Cyrillic, Turkish, and CJK (Chinese, Japanese, Korean) via embedded Noto Sans CJK.
4 Print Themes & Bulk ZIP Export
Choose between Clean, Business, Academic, and Dark themes with print margin optimization. Print single documents or books directly, or export a packaged ZIP containing individual chapter PDFs with deterministic naming.
工作原理
三步完成,无需账号,也没有服务器端渲染器。
提供仓库
Paste a GitHub repo URL, branch path, or paste Markdown directly. md2pdf resolves default branches, auto-discovers READMEs, and parses GitHub Flavored Markdown in milliseconds.
打开转换器观看渲染
Filter files through the searchable tree, sequence chapters, add titles, and choose from Clean, Business, Academic, or Dark print themes.
比较各主题打印为 PDF
Trigger isolated browser print to save a pixel-perfect PDF, or click Export to download a zipped archive of all selected chapter PDFs with self-hosted font embedding.
阅读隐私说明Built for Real Documentation Needs
Whether you are boarding a 14-hour flight or handing over an enterprise software deliverable, md2pdf turns Markdown into publication-grade documents.
Offline Reading & Travel
Download and archive complex repository documentation into readable, paginated PDFs for flights, commutes, e-readers, or air-gapped development environments where internet access is unavailable or restricted.
- Retains internal heading links and relative images offline
- High-contrast typography tuned for physical reading & tablets
- Table of contents enables quick chapter navigation
Client Handover & Deliverables
Deliver software projects to non-technical stakeholders and clients with professional, branded PDF documentation rather than raw GitHub repository URLs.
- Automated cover page with title, subtitle, and date
- Clean table and code formatting that looks executive-ready
- Single-click batch ZIP export for client deliverables
Team Onboarding & Runbooks
Turn fragmented repository guides, architecture notes, and deployment runbooks into a single consolidated, sequenced onboarding handbook for new hires.
- Assemble multiple markdown files into one cohesive book
- Custom chapter ordering: overview → setup → architecture
- Standardized print layout across all engineering repos
Confidential Notes & Specs
Convert proprietary code documentation, API specs, and private markdown notes into PDFs with absolute confidence. All compilation occurs inside local browser memory.
- Zero server upload — text never traverses the internet
- DOMPurify sanitization ensures safe, clean output
- No account registration or token generation required
四款打印主题
每款主题都是一套打印样式表,而非简单的配色替换——请选择与文档气质相符的那一款。
简洁
Default中性无衬线字体,规格文档与 README 的默认之选。
商务
Executive衬线标题搭配深色代码块,适合报告。
学术
Formal两端对齐的衬线页面,适合长篇论述。
深色
OLED / Screen以屏幕阅读为先;打印时自动调亮,不丢失信息。
Frequently Asked Questions
Everything you need to know about privacy, GitHub API rate limits, font embedding, and documentation books.
Is my repository code or private Markdown uploaded to any server?
No. 100% of markdown parsing, sanitization, PDF layout, and ZIP packaging happens directly inside your browser memory. md2pdf has zero application backend, zero database, and zero telemetry.
What happens if the GitHub API rate limit is exceeded?
When GitHub unauthenticated API limits are reached, md2pdf automatically falls back to raw content streaming via raw.githubusercontent.com, allowing public READMEs to convert without interruption.
How does the Documentation Book builder work?
The Book builder uses the Git Trees API to scan the repository structure. You can search, filter, and select up to 30 markdown files with tri-state directory checkboxes, reorder the chapter sequence, generate an automatic cover and master table of contents, and print or download a ZIP archive of PDFs.
Are relative images and internal links preserved in the PDF?
Yes! Relative image paths (such as ./assets/screenshot.png) are automatically rewritten to raw.githubusercontent.com pinned to the specific branch or commit SHA, and external links are preserved as clickable PDF URI annotations.
Which languages and Unicode scripts are supported?
md2pdf embeds standalone fonts in the exported PDFs: DejaVu Sans and DejaVu Sans Mono for Latin, Cyrillic, and Turkish, and Noto Sans CJK SC for Chinese, Japanese, and Korean text.
Can I print without creating a PDF file on disk?
Yes. md2pdf features a dedicated browser print isolation engine. Clicking "Print" formats only the styled document sheet with native page breaks, allowing you to use your browser's Print dialog to print directly or save as PDF.
Human-Readable Sitemap
Comprehensive index of all tools, features, technical guides, documentation, and project links.