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

相关推荐
宋明河几秒前
五种 IO 模型与 select、poll、epoll 对比
linux
玄芯散人10 分钟前
【金丹·81】性能分析:你的程序慢在哪
linux·性能优化·perf
天意__16 分钟前
Linux部署Qwen轻量模型
linux·服务器·qwen
木卫二号Coding38 分钟前
第八十六篇-Strata 部署指南(Ubuntu 22.04 + Tesla V100【单卡】)
linux·运维·人工智能·ubuntu
11路没有终点40 分钟前
sed 命令详解:文本编辑流处理实战
linux
码完就睡1 小时前
Linux——线程的创建与同步
linux·运维
Lsetea1 小时前
OpenSSL读取加密私钥报bad decrypt:passin与口令来源排查
linux·https·ssl证书·openssl·私钥
FY@-@1 小时前
Shell 脚本编程:条件判断与循环
linux·运维·前端
Peregrine91 小时前
Linux 基本指令大全
linux·运维·服务器
拂拉氏2 小时前
【知识讲解】 Linux动静态链接认识
linux·动静态链接