PDFMerger.io 的工作原理

用通俗的语言解释使用我们的工具时发生了什么,以及为什么您的文件从不离开您的设备。

简而言之

当您打开 PDFMerger.io 并使用任意工具时,一切都发生在您的浏览器标签页内。您的 PDF 文件从硬盘读取,用 JavaScript 在内存中处理,结果再写回您的硬盘,整个过程没有任何数据离开您的设备。不需要传输文件,不涉及服务器,也没有云存储。

背后的技术库

pdf-lib

负责所有 PDF 操作:合并、拆分、旋转页面、删除页面、压缩,以及解锁加密文件。它直接在浏览器中读取 PDF 文件的二进制结构,无需任何服务器端渲染即可生成新的 PDF。输出质量与输入完全相同,图片和字体不会被重新编码。

pdfjs-dist (PDF.js)

Mozilla 的 PDF 渲染引擎。PDFMerger.io 用它生成 PDF 页面的缩略图预览,方便您在处理前直观地核对文件。它把 PDF 页面渲染到 HTML canvas 元素上,全部在浏览器中完成。

Tesseract.js (OCR)

A WebAssembly port of the Tesseract OCR engine. When you use the PDF OCR tool, each page is rendered to a canvas at 2× resolution and fed to Tesseract running locally in your browser. The WASM binary and language data are loaded from a CDN on first use — your PDF content is never sent anywhere.

react-signature-canvas + pdf-lib (Sign PDF)

The Sign PDF tool captures your signature using a canvas element (draw, type, or upload). The signature is converted to a PNG image and embedded into the PDF using pdf-lib's image embedding API — all in memory. No server is involved at any step.

合并 PDF 时每一步发生了什么

  1. 1You drag files onto the merge area. The browser reads each file from your disk using the File API — a standard browser feature that gives JavaScript access to local files you explicitly select.
  2. 2PDF.js renders the first page of each file to a canvas element to generate the thumbnail previews you see in the file list. This happens entirely in your browser's memory.
  3. 3You click "Merge PDF". pdf-lib opens each PDF's binary structure, extracts the page objects, and writes them into a single new PDF document — all in memory.
  4. 4The finished PDF bytes are converted to a Blob (a temporary in-memory file object) and a download link is created using URL.createObjectURL(). Your browser's native download mechanism saves it to your Downloads folder.
  5. 5When you close the tab, all data is cleared from memory. Nothing persists anywhere.

隐私:我们收集什么,不收集什么

✓我们从不查看您的文件。文件内容、文件名和元数据都不会发送到我们的服务器。
✓我们收集匿名使用统计。我们通过 Vercel Analytics 统计每个工具的使用次数,不涉及文件内容,也不涉及个人身份信息。
✓无需账号。没有登录,没有邮箱,没有个人资料。
✓不存储文件。文件只在处理期间存在于您浏览器的内存中。

PDF 格式与兼容性

PDFMerger.io 支持标准 PDF 文件(任意版本)。目前不支持 PDF/A、PDF/X,也无法处理密码未知的加密 PDF。工具可以处理来自 Adobe Acrobat、Microsoft Word、WPS、Google 文档、macOS 预览、LibreOffice、扫描仪以及浏览器“打印为 PDF”所生成的 PDF。

浏览器与设备要求

任何现代浏览器都可以使用:桌面端和手机端的 Chrome、Firefox、Safari、Edge 和 Brave。处理性能取决于设备的可用内存。大型 PDF(100 MB 以上)处理会慢一些。如果标签页在处理超大文件时无响应,请尝试把任务拆成更小的批次。

为什么浏览器本地处理如此重要

大多数在线 PDF 工具会把您的文件传到服务器,在那里处理后再把结果发回给您。这意味着您可能十分敏感的文档要经过第三方的基础设施。而在 PDFMerger.io,整个处理链条从不离开您的设备。处理文件时根本不涉及任何基础设施,自然也就没有基础设施带来的风险。