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

相关推荐
为思念酝酿的痛5 小时前
POSIX信号量
linux·运维·服务器·后端
人还是要有梦想的6 小时前
linux下用搜狗输入法,中英文切换
linux·运维·服务器
bush47 小时前
嵌入式linux学习记录二
linux·运维·学习
9分钟带帽7 小时前
linux_通过NFS挂载远程服务器的硬盘
linux·服务器
运维栈记9 小时前
API Error: 400 Request body format invalid
linux·ai
小白兔奶糖ovo9 小时前
【Leetcode】231. 2的幂
linux·算法·leetcode
s_w.h10 小时前
【 linux 】动静态库的制作
linux·运维·服务器·算法·bash
顺风尿一寸10 小时前
深入Linux内核:mkdir系统调用的完整实现解析
linux
用户23678298016810 小时前
Linux free 命令深度解析:从内存监控到 OOM 排查的完整指南
linux
无足鸟ICT11 小时前
【RHCA+】boxes命令(艺术框)
linux