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

相关推荐
会编程的土豆1 小时前
Go 模板初识
linux·运维·服务器
aFakeProgramer3 小时前
Linux版本兼容问题及RTA-VRTE环境配置笔记
linux·笔记
Zhu7583 小时前
在Ubuntu24快速配置专用SFTP
linux·sftp
码农客栈4 小时前
Linux 内核顶层 Makefile 详解
linux
Embedded-Xin4 小时前
Rust学习——Cargo工具
linux·学习·架构·rust·嵌入式
weixin_435776114 小时前
2026年长沙托育vi设计从风格定位到元素运用的设计方法
linux·运维·服务器·python
benjiangliu5 小时前
LINUX系统-19-库制作与原理(一)
linux·运维·服务器
FriendshipT6 小时前
Ubuntu 20.04 下使用 Ollama 本地部署 AI 大模型
linux·人工智能·python·深度学习·ubuntu
bellus-7 小时前
win11使用ubuntu 26.04
linux·运维·ubuntu
略略略咯咯7 小时前
centos更换镜像源
linux·运维·centos