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

相关推荐
Zk.Sun12 分钟前
Linux设置触屏双击距离容差
linux·运维·数据库
bukeyiwanshui39 分钟前
20260622 安装配置ubuntu
linux·运维·ubuntu
写代码的学渣1 小时前
Linux 安装 Swap 交换分区大小标准(通用 + 生产服务器 + 个人 PC)
linux·运维·服务器
qq_163135751 小时前
Linux 【03- netstat命令超详细教程】
linux
cjhbachelor1 小时前
线程的控制
linux
写代码的学渣2 小时前
Linux 彻底清空历史命令 & 恢复历史命令(完整版、重启永久生效)
linux·运维·chrome
生万千欢喜心2 小时前
liunx AnolisOS-8.9-x86_64-dvd.iso win11 适配龙蜥 - 虚拟机
linux
天空'之城3 小时前
Linux 系统编程 12:TCP 进阶
linux·网络编程
红糖奶茶3 小时前
怎么样在遍历列表时动态判断阈值是否被满足并返回相应文本
java·linux·服务器
bkspiderx4 小时前
rpath:Linux 中固定共享库搜索路径的“永久解决方案”
linux·rpath·固定共享库搜索路径