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

相关推荐
一个人旅程~38 分钟前
linux如何“抢”过windows的usb移动硬盘权限对0磁道损坏的移动硬盘进行尝试修复
linux·windows·经验分享·电脑
sukioe1 小时前
Linux RPM 方式安装 MySQL 8.0
linux·mysql·adb
Bert.Cai2 小时前
Linux tee命令详解
linux·运维·服务器
宋浮檀s2 小时前
应急响应(系统日志)
linux·运维·网络安全·应急响应
cui_ruicheng3 小时前
Linux网络编程(七):TCP Socket编程与EchoServer
linux·服务器·网络·tcp/ip
feasibility.3 小时前
nvidia-smi 失灵,显存凭空消失?—— NVML 驱动版本错配的记录
linux·运维·服务器·经验分享·nvidia·驱动
Irissgwe4 小时前
二、Linux基础开发工具(2)
linux·makefile·gcc·g++·
basketball6164 小时前
Linux sed 和 awk 命令使用方法
linux·运维·chrome
一拳一个娘娘腔4 小时前
Linux SSH免密登录:从“刷卡进门”到“刷脸通行”的完整指南
linux·运维·ssh
代码AC不AC4 小时前
【Linux】线程控制
linux·线程·线程控制