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 小时前
Linux 零基础教程 09、11、77
linux·运维·服务器
嵌入式学习和实践9 小时前
嵌入式 Linux 调闭源 SDK 怕崩?用 dlopen 把第三方动态库库“隔离“起来
linux·三方库
小樱花的樱花10 小时前
Linux 多线程编程:互斥锁(Mutex)详解
linux·c语言·开发语言
麦兜和小可的舅舅10 小时前
从原理到实战:Linux 系统性能诊断核心指标全解析及生产系统故障分析复盘
大数据·linux·运维
mounter62511 小时前
质检员与超能引擎的碰撞:KASAN 护航 eBPF JIT 的技术演进与安全抉择
linux·ebpf·linux kernel·kernel·kasan
风123456789~11 小时前
【Linux专栏】history常用命令
linux·运维·服务器
熬夜苦读学习11 小时前
基于websocket的多用户五子棋网页游戏
linux·服务器·网络·websocket·网络协议·游戏·五子棋
fpcc11 小时前
Linux 7.1介绍
linux·运维
三84412 小时前
磁盘管理/fdisk
linux·运维·服务器
库玛西12 小时前
深入剖析 Linux 线程机制与分页式存储管理
linux·服务器·c++·笔记