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

相关推荐
chicheese2 分钟前
Linux 面试速查表:从初级到高级,附高频场景答题模板
linux·运维
Linux-lucky30 分钟前
32-38-Linux学习之旅之MySQL综合
linux·运维·学习·mysql·ubuntu
vortex51 小时前
常用终端模拟器全面对比:Kitty、WezTerm、Ghostty 与 Konsole
linux
INGNIGHT2 小时前
270 · 电话号码的字母组合II(Trie)
linux·算法
zly35002 小时前
VMware Converter Standalone 物理机转化为虚拟机后源1硬盘变成了2个硬盘(2个硬盘文件)虚拟机无法启动。
linux·运维·服务器
GeW4 小时前
从内核到数据:Linux与工业数据库如何支撑高端制造
linux
小小的木头人5 小时前
Linux systemd Service 与 Timer 定时任务原理及实战
linux
熊明才6 小时前
WSL2 网络突然瘫痪(Network is unreachable / 没有 eth0)最短修复指南(2026年9月20日亲测可用)
linux·windows·wsl2
Tairitsu_H7 小时前
[Linux系统] 自动化构建make / Makefile | 进度条
linux·操作系统·makefile·make
行者全栈架构师7 小时前
大模型运维准确率不到 50%?我们用 DeepSeek V4 测了 5 大场景,结果出人意料
linux·人工智能·开源