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

相关推荐
吹什么轩11 分钟前
Linux系统复习:权限的解析
linux·运维·服务器
liebe1*124 分钟前
Module 2:Linux Fundamentals Part 1
linux·运维·服务器
imaol133 分钟前
进程 ---(多任务并行)
linux·运维·服务器
mengge.cloud36 分钟前
0824LAMP项目实战:部署WordPress博客平台小白教程
android·linux·运维·服务器·学习·nginx
zone_z1 小时前
07 · 等待事件与 OWI 方法:从 OSW 到 BUG 的完整破案实录
linux·数据库·oracle·ffmpeg·bug·troubleshooting
Brilliantwxx1 小时前
【Linux】 进程(5) 僵尸进程与内存泄漏扩展
linux·运维·服务器·网络·c++
w01_02_031 小时前
虚拟机, ubuntu , samba
linux·运维·ubuntu
渣渣盟1 小时前
Nginx 从零到上手:Windows & Linux 双环境教程
linux·windows·nginx
Dola_Zou1 小时前
CodeMeter Linux 部署与配置指南
linux·运维·自动化·软件加密
MSTcheng.1 小时前
【Linux学习】Linux学习第二弹——Linux基本指令1
linux·运维·服务器·学习·指令