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

相关推荐
星恒随风6 分钟前
从0实现C++ AI大模型接入SDK(十):DataManager业务实现——数据库CRUD、事务管理与数据一致性
linux·服务器·jvm·数据库·c++
qetfw26 分钟前
Debian 部署 Discuz!:运行环境、数据库与安装验收
linux·运维·数据库·debian
心之王者71611 小时前
【Linux】多线程:从线程控制、同步互斥到经典并发模型
linux·运维·服务器
Doctor_Strange_DML11 小时前
图像编辑模型服务部署过程记录
linux·缓存·docker·ai
笔记本note16 小时前
Linux 文件系统与设备文件
linux·服务器·文件系统
无足鸟ICT16 小时前
【RHCA+】_proc_pid_cmdline
linux·运维·服务器
学以智用17 小时前
CentOS Linux 文件操作详解
linux
饿了吃洗衣凝珠17 小时前
shell循环
linux·运维·服务器
代码不停19 小时前
Linux基础知识
java·linux·数据库
东风微鸣19 小时前
Linux台式机也能指纹识别登录验证啦
linux·指纹