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

相关推荐
无足鸟ICT8 分钟前
【RHCA+】sosreport(收集诊断文档)
linux·运维·服务器
GeW24 分钟前
世界目光聚焦中国:底层技术、Linux、数据库的破局逻辑
linux·数据库
星恒随风2 小时前
MySQL 从零入门(十):MVCC、Undo Log 与 Read View 详解——InnoDB 如何实现事务隔离?
linux·数据库·笔记·sql·mysql
瑞雪兆丰年兮3 小时前
Linux零基础快速入门-第二章 Linux基础命令
linux·运维·服务器
咋的啥名都用不了呢~6 小时前
Linux项目部署6(安装Elasticsearch)
linux
无奈笑天下7 小时前
银河麒麟桌面上USB打印机无法打印问题标准处理流程
linux·运维·网络协议
15Moonlight7 小时前
Linux 网络(11):IO 多路转接(select /poll/epoll)
linux·网络
wno7049 小时前
CentOS下FTP服务搭建
linux·运维·centos
15Moonlight9 小时前
Linux网络(12):Reactor 模式
linux·网络
思想觉悟10 小时前
Android启动流程之点rc文件
android·linux·面试