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

相关推荐
张洛闻Eren1 天前
MySQL 维护稳定系统【MySQL第二课】
linux·数据库·mysql·云原生
ltl1 天前
Linux 异步 I/O:epoll 与 io_uring 对比
linux
ltl1 天前
压缩算法工程实践:吞吐、比率与 CPU 权衡
linux
fiveym1 天前
01 - iPXE + Clonezilla 网络装机原理解析
linux·运维·服务器·网络
-今昭-1 天前
Ansible
linux·运维·ansible
mounter6251 天前
MACsec 全景解析:从技术演进、核心架构到 DPU 硬件卸载与 K8s 大规模调度实战
linux·kubernetes·linux kernel·kernel·macsec
IT邦德1 天前
Dify1.6基于ubuntu系统的部署实战
linux·运维·ubuntu
吠品2 天前
Java byte数组与String互转:编码细节与踩坑记录
java·linux·服务器
木白CPP2 天前
Linux 驱动UART子系统源码分析
linux·运维·服务器·驱动开发·嵌入式硬件·开源软件
RisunJan2 天前
Linux命令-times(进程累计时间显示)
linux·运维·chrome