Linux笔记--基于OCRmyPDF将扫描件PDF转换为可搜索的PDF

1--官方仓库

https://github.com/ocrmypdf/OCRmyPDF

2--基本步骤

bash 复制代码
# 安装ocrmypdf库
sudo apt install ocrmypdf

# 安装简体中文库
sudo apt-get install tesseract-ocr-chi-sim

# 转换
# -l 表示使用的语言
# --force-ocr 防止出现以下错误:ERROR - PriorOcrFoundError: page already has text! - aborting (use --force-ocr to force OCR)
# input.pdf 表示待转换的pdf
# output.pdf 表示转换后保存的pdf
ocrmypdf -l chi_sim input.pdf output.pdf --force-ocr

3--常见错误

Error1:

ERROR - PriorOcrFoundError: page already has text! - aborting (use --force-ocr to force OCR)

Solution:

添加--force-ocr

ocrmypdf -l chi_sim input.pdf output3.pdf --force-ocr

相关推荐
song85815 分钟前
韦东山开发手册阅读笔记(五)
linux
LIZhang201620 分钟前
linux写一个脚本实时保存内存占用情况
linux·运维·服务器
IDC02-阿杰32 分钟前
Windows WSL2安装Ubuntu24.04全攻略
linux·windows
s09071361 小时前
ZYNQ7000 AXI DMA 接收中断(S2MM_introut)全解析:从硬件原理到Linux驱动开发
linux·驱动开发·dma·zynq
camellias_1 小时前
ubuntu(二)ubuntu18.04安装mysql8
linux·ubuntu·adb
藤谷性能1 小时前
Ubuntu 22.04:安装串口调试助手CoolTerm
linux·运维·ubuntu·串口·coolterm
路溪非溪1 小时前
如何使用sysfs来排查驱动问题
linux·arm开发·驱动开发
丶伯爵式1 小时前
Ubuntu 新装后常用设置
linux·运维·ubuntu
哼?~1 小时前
Socket编程准备
linux·网络
羌俊恩1 小时前
Vim modeline 命令执行漏洞(CVE-2026-34714)修复指导
linux·编辑器·vim·漏洞·cve-2026-34714