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

相关推荐
AC赳赳老秦19 小时前
OpenClaw二次开发实战:编写专属办公自动化技能,适配个性化需求
linux·javascript·人工智能·python·django·测试用例·openclaw
mounter62520 小时前
【内核新动向】告别物理槽位束缚:深度解析 Linux Virtual Swap Space 机制
linux·内存管理·kernel·swap·virtual swap
handler0120 小时前
从零实现自动化构建:Linux Makefile 完全指南
linux·c++·笔记·学习·自动化
2023自学中21 小时前
i.MX6ULL 板子的完整启动流程图(从上电 → 用户空间)
linux·嵌入式
闫利朋21 小时前
Ubuntu 24.04 桌面安装向日葵完整指南
linux·运维·ubuntu
YSF2017_31 天前
C语言16-makefile(3)——makefile的模式规则
linux·c语言·开发语言
不做无法实现的梦~1 天前
Linux 上使用 CLion 开发嵌入式,并用 Codex CLI
linux·运维·服务器
张3231 天前
Ansible拆分大型Playbook
linux·ansible
苦逼大学生被编程薄纱1 天前
Ext 文件系统基础:Linux 存储基石入门(下)
linux·运维·服务器
Lumos_7771 天前
Linux -- 进程
linux·运维·服务器