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

相关推荐
---学无止境---1 分钟前
Linux中基数树批量查询数据项相关函数的实现
linux
我也想失去烦恼1 小时前
Linux系统/etc/hosts文件中配置了主机解析,但还是无法解析ip
linux·运维·服务器
deng-c-f3 小时前
Linux C/C++ 学习日记(29):IO密集型与CPU密集型、CPU的调度与线程切换
linux·学习·线程·cpu·io密集·cpu密集
报错小能手6 小时前
linux学习笔记(43)网络编程——HTTPS (补充)
linux·网络·学习
报错小能手6 小时前
linux学习笔记(45)git详解
linux·笔记·学习
Maple_land6 小时前
常见Linux环境变量深度解析
linux·运维·服务器·c++·centos
小白银子8 小时前
零基础从头教学Linux(Day 53)
linux·运维·python
skywalk81639 小时前
基于频域的数字盲水印blind-watermark
linux·开发语言·python
Wang's Blog10 小时前
Linux小课堂: 定时与延时执行机制之date、at、sleep 与 crontab 的深度解析
linux·运维·服务器
被漂一组11 小时前
在线解决window和linux对linux远程问题
linux·运维·服务器