离线 · 无上传 · 浏览器本地完成Offline · no uploads · runs in the browser
Markdown 转 PDF——离线渲染成 A4,产物是图像不是文字层Markdown to PDF offline — the output is an image, not text
这条链路给的是「打印件」,不是「文档」。Markdown 先渲染成 HTML,再整页栅格化、按 A4 宽度切片写成 PDF 页面。于是不管接收方用什么设备、装没装中文字体,看到的都和你看到的一样。也正因为它是渲染出来的图像,PDF 里的文字选不中、复制不走、搜索引擎检索不到,文件体积比文字型 PDF 大一截。要不要这条,取决于你要交付的是观感还是内容。What this route produces is a printout, not a document. Markdown is rendered to HTML, the page is rasterised whole, and it is sliced onto A4 to become PDF pages. The result looks the same on every device, fonts or no fonts. And because it is a rendered image, the words in that PDF cannot be selected, copied or searched, and the file is heavier than a text-based PDF. Whether that is the right trade depends on whether you are delivering an appearance or a content.
这条链路怎么走How the route runs
MarkdownMarkdown HTMLHTML PDFPDF
共 2 步,由扩展的路径搜索自动选出,中间产物不落盘。2 steps, chosen by the extension's own path search; intermediate results never touch the disk.
会保留什么What carries over
- 排版观感:标题层级、列表、表格、代码块、引用块、图片按 HTML 渲染结果落到页面上The appearance: heading hierarchy, lists, tables, code blocks, quotes and images land on the page as the HTML renders them
- A4 宽度、逐页切片,长文档会自然分页,不是一整条长图A4 width with page-by-page slicing, so a long document flows into pages instead of one tall strip
- 页面最长边受 8192 px 上限保护,超长文档在编码前先行缩放而不是崩溃The raster is capped at an 8192 px longest edge, so an enormous document downscales instead of failing
如实说明的限制What it does not do
- 没有文字层:PDF 里的字选不中、复制不走、无法全文检索、屏幕阅读器读不到——它是一页页图像No text layer: the words cannot be selected, copied, full-text searched or read by a screen reader — the pages are images
- 文件明显大于同内容的文字型 PDFNoticeably heavier than a text-based PDF of the same content
- 页边距与分页位置由渲染高度决定,不能像 Word 那样指定「第 3 页开始」;跨页的表格可能被切成两段Margins and page breaks follow the rendered height; you cannot dictate "start on page 3", and a tall table can be cut in two
- 图片引用只有 data URI 与 blob 能落地:远程与相对路径引用在渲染前就换成虚线方框占位(相对路径在沙箱里指向扩展包,不在你文件所在的目录),而解不开的 data: 与已撤销的 blob: 会在那处直接留空,转换过程不下载任何东西,结果卡片按张数说明有多少处Only a data URI or a blob reference survives: a remote or a relative one becomes a dashed placeholder box before rendering (inside the sandbox a relative path points into the extension package, not next to your file), one the browser cannot decode any more — a revoked blob:, a data: payload it will not read — leaves that position empty, the conversion downloads nothing, and the result card counts how many positions were affected
实操提示Working with it
- 如果接收方要能改,请走 Markdown → Word,那才是可编辑的产物If the recipient has to edit, take Markdown to Word instead — that is the editable artifact
- 批量最多 200 个文件;多个 PDF 结果可一次打包成 ZIP 下载Up to 200 files per batch; several PDFs can come back in one ZIP
常见问题Questions people actually ask
为什么 PDF 里的文字选不中?Why can’t I select the text in the PDF?
因为产物是每页一张图像,浏览器端不做文字层排版。需要可选中、可检索的 PDF,本项目给不了;需要可编辑交付请用 Word,需要文本用 PDF → 文本的反向思路处理原始 Markdown。Because each page is one image, and no text layer is laid down on the browser side. A selectable, searchable PDF is not something this route can promise; for an editable deliverable use Word, and keep the Markdown itself as your text source.
能控制纸张大小或方向吗?Can I choose paper size or orientation?
当前固定 A4 纵向,页宽 210 mm。这是产物的既有语义,改动会影响历史批次与预设,不在这条链路的选项里。It is fixed at A4 portrait, 210 mm wide. That is settled behaviour of this artifact, and changing it would move historical batches and presets, so it is not an option on this route.
为什么表格被切开了?Why was my table split across pages?
分页发生在渲染高度上,切到一半是栅格化切片的正常结果。想要不断开的表格,把内容改短或在表格前后分段,或转成 HTML / Word 让排版器自己处理。Page breaks follow rendered height, so a split is normal for a slice-based raster. Shorten the block, break the document there yourself, or go to HTML / Word and let a layout engine handle it.
不需要账号,也不需要联网:装好扩展后点图标,在新标签页里打开工作台,文件从磁盘直接选。No account and no network: install the extension, click its icon, and the workbench opens in a new tab reading straight off your disk.
从 Chrome 应用商店安装Install from the Chrome Web Store 安装步骤Install steps GitHub 源码Source on GitHub