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

相关推荐
xie0510_1 小时前
TCP socket
linux·网络协议·tcp/ip
aningx1 小时前
# EasyTier 开机自启动部署教程
linux
DeeplyMind1 小时前
Linux 内核模块加载路径与 initramfs 生效机制分析
linux·initramfs·depmod·modprobe
Horn Still Sounds2 小时前
Linux网络编程|UDP与TCP传输层协议深度梳理
linux·网络·tcp/ip·udp
Mortalbreeze2 小时前
深入理解 Linux IO 模型(一):阻塞 IO、非阻塞 IO 与信号驱动 IO
linux·运维·服务器
一直C2 小时前
Linux应用软件编程|TCP协议与Socket全套编程(三次握手、四次挥手、报文头部、核心机制)
linux·网络协议·tcp/ip·wireshark·vim·visual studio
2301_780789663 小时前
CDN提供商常用的DDoS缓解技术与策略
linux·运维·服务器·人工智能·架构
夏炳辉.3 小时前
Rocky Linux 8 从零安装 psql(PostgreSQL 客户端)
linux·运维·postgresql
β添砖java3 小时前
学习笔记:实战章节:在Linux上部署各类软件
linux·笔记·学习
老当益壮梁奶奶4 小时前
Linux软件编程学习笔记(十一):深入浅出 TCP 协议与 Socket 编程实践
linux·c语言·笔记·学习·tcp/ip