跳到正文

PDF 转 Word

根据 PDF 里的文本重建一个可编辑的 .docx。

在你的设备上处理

这款工具完全在你的浏览器中运行。文件从不上传,你可以在浏览器的网络标签中亲自验证这一点。 亲自验证:打开浏览器的网络标签观察。你会看到一个查询你是否还有剩余任务的小请求,只包含工具名称和一段哈希,绝不会包含文件。

这款工具的作用

This rebuilds a Word document from what a PDF actually contains, which is glyphs at coordinates rather than paragraphs. Headings, lists and tables are inferred from the geometry of the page and written into a real .docx. It is a reconstruction, not the original recovered: the text re-flows in Word, so line and page breaks will not always fall where the PDF put them.

Use it when you have to change words in a document nobody sent you the source for: a contract that needs amending, a template letter worth re-using, a report whose figures have moved on, or a page of text you would rather edit than retype.

工作原理

  1. Drop the PDF onto this page. One file at a time, up to 200 MB.
  2. Choose the layout mode. Flowing gives paragraphs that re-wrap as you edit; preserve keeps the original line breaks and looks closer to the PDF.
  3. Leave heading, table and list detection on unless the document is plain prose you want kept plain.
  4. Under advanced options, give a page range to convert one chapter rather than the whole file.
  5. Press Convert to Word.
  6. Open the .docx and check the tables first - they are where reconstruction is hardest.

A PDF does not contain the Word document it was made from. When the PDF was written, the paragraph, the heading style and the table were thrown away, and what survived was ink at coordinates. Turning that back into structure means inferring it: a line in a larger or bolder face becomes a heading, lines sharing a hanging indent become a list, text in consistent vertical gutters becomes a table. The same analysis feeds PDF to Markdown, so there is one detector to improve rather than two that would slowly disagree.

The two modes answer different questions. Flowing is for editing: sentences become paragraphs that re-wrap when you change a word, which is what makes the file useful and also why it will not look identical to the PDF. Preserve is for looking at: each line becomes its own paragraph, so the page keeps its shape and edits badly, since typing into one line pushes nothing along to the next.

A scan is checked for before any work starts. The first five pages are sampled for a text layer, and if there is none the conversion stops and points at OCR, because a scan is a picture of words with nothing in it to convert. That is a deliberate choice over handing you an empty document and letting you conclude the tool is broken.

The .docx is assembled in your browser - the OOXML written by hand and zipped locally - so no part of a confidential contract is uploaded to be converted. The only thing that crosses the network is the allowance check, which is worth knowing when the document is the sort you would not put through a web service in the first place.

这款工具做不到的事

  • The document is inferred from page geometry rather than recovered from an original, so expect to correct some headings, spacing and table edges by hand.
  • Pictures are not carried into the .docx. The conversion works from the text layer; use PDF to image if you need the artwork from a page.
  • Multi-column layouts, sidebars and footnotes are flattened into one stream of text in the order the analysis reads them.
  • A scanned PDF has no text to convert. It is refused with a link to OCR rather than producing an empty document.

常见问题

Word 文件会和 PDF 看起来完全一样吗?
不会,而且没有哪个转换器能诚实地承诺这一点。Word 会用它自己的断行和字体度量重新排版文本,所以分页会移动、间距会不同。「保留换行」模式保留原来的换行,视觉上更接近;「流动」模式看起来不那么像,但它才是你真正能编辑的那个。对于信函或报告,这种差异只是外观上的。
我的 PDF 是扫描件,无法转换。为什么?
因为扫描件包含的是文字的照片,而不是文字。会对前五页采样查找文本层,如果没有,转换就会停止,并把你转到 OCR。请先运行「OCR PDF」,然后回来转换其结果。
表格会保留吗?
通常会,只要表格是以一致的列排布的。检测是基于几何的——它寻找每一行都存在的纵向间隔——所以一张干净的财务表格转换得很好,而一张靠画线和不规则间距撑起来的表格,可能会变成普通段落。合并单元格不会被重建。
我 PDF 里的图像会怎样?
它们不会被带进 Word 文档。转换是基于文本层进行的,所以照片、徽标和图表都会被留下。如果你需要它们,就对那些页面运行「PDF 转图片」,再自己把图片插入 .docx。
我该用哪种版式模式?
如果你要编辑文本,就用「流动」,因为段落会像段落那样表现。如果你主要需要一份看起来像 PDF、且只用来阅读的东西,就用「保留换行」,因为每一行都会成为自己的段落。
转换时我的文档会被上传吗?
不会。PDF 的读取和 .docx 的生成完全在你的浏览器中进行,Word 文件是在本地组装的,而不是由服务器组装。什么都不会被传输,你可以在开发者工具的网络标签里验证这一点,而且这款工具在断网时也能继续使用。

相关工具