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

相关推荐
happymaker06264 分钟前
Linux常见命令总结
linux·运维·服务器
lbb 小魔仙8 分钟前
【Linux】DevOps 工程师必备:Linux 自动化脚本与高效工具链整合
linux·自动化·devops
开源量化GO19 分钟前
期货 K 线算信号 tick 级止损:天勤双序列 wait_update 触发规则
linux·运维·服务器·python
m0_7381207221 分钟前
HVV应急溯源基础——Linux 系统安全加固配置指南(一)
linux·运维·服务器·安全·网络安全·系统安全
RisunJan28 分钟前
Linux命令-perl (perl语言解释器)
linux·perl
vortex51 小时前
Linux日志轮转管理:logrotate 完全指南
linux·运维·服务器
ggaofeng2 小时前
如何通过uboot加载硬盘
linux·qemu·uboot
尔染君子2 小时前
嵌入式Linux驱动开发(按键驱动)
linux·驱动开发
kebidaixu2 小时前
BCU 平台 Modbus 主机功能开发:液冷机组 & 消防传感器
linux
vsropy2 小时前
安装虚拟机VMware
linux·windows