用 Poppler 提取 PDF 内容

从 shell 中提取 PDF 的文本、图片或页面渲染。

Linux文本转换PDF低风险
运行 pdftotext document.pdf -,把文档文本输出到标准输出。

01命令

命令
$ pdftotext document.pdf -

02作用说明

Poppler 工具集覆盖常见 PDF 需求:pdftotext 提取文本,pdfimages 导出内嵌图片,pdftoppm 栅格化页面,pdfinfo 报告元数据。它们与 grep 等文本工具配合良好。

03风险

风险低风险
使用条件sudo apt install poppler-utils
!注意: 只有 PDF 含文本层时才能提取文字;扫描件需要先做 OCR。

04撤销

✓无需撤销——该命令不会改变持久状态。

05来源

  • Debian package: poppler-utils
    Debian · vendor-doc · 2026-09-20
    依据: Debian packages poppler-utils, which provides pdftotext, pdfimages, pdftoppm and related PDF tools.
  • Poppler
    Official project · vendor-doc · 2026-09-20
    依据: Debian packages poppler-utils, which provides pdftotext, pdfimages, pdftoppm and related PDF tools.

最后验证: 2026-09-22 · 分类: 开发者

06相关方案