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

相关推荐
Fcy6489 分钟前
Linux下 Socket编程 —— TCP网络编程
linux·网络·tcp/ip
LongRunning1 小时前
【Linux】RK3568(三)操作-视频流
linux
Discipline~Hai1 小时前
Linux网络编程02-TCP协议
linux·网络·tcp/ip·嵌入式·linux网络编程
abc light2 小时前
Linux TCP网络
linux·网络·tcp/ip
Jason_zhao_MR2 小时前
电能质量监测为什么需要PTP精确时钟同步
linux·单片机·嵌入式硬件·嵌入式
视觉小萌新2 小时前
A1——基于AMD-48G显卡下载Gemma4模型
linux·ubuntu
不会就选b3 小时前
数据结构之栈的算法题(OJ)
linux·数据结构·算法
刘某的Cloud4 小时前
k8s部署prometheus架构规则
linux·运维·kubernetes·prometheus·监控
mounter6254 小时前
从 2026 LSFMM/BPF 峰会看 eBPF 生态演进:技术变革、工具全景与资源泄漏诊断实战
linux·linux kernel·kernel
M78佐菲4 小时前
Linux学习笔记:网络通信
linux·笔记·学习·算法