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

相关推荐
cccccc语言我来了31 分钟前
Linux (11) 进程控制
linux·运维·数据库
菜菜的院子36 分钟前
WSL2 运行 Ubuntu 26.04 完整 GNOME 桌面(WSLg Wayland)
linux·运维·ubuntu·wsl
暖核1 小时前
从 CentOS 到 Ubuntu24.04 运维迁移手册:命令对照表 + 实操 + 避坑
linux·运维·centos
pride.li1 小时前
第12章 Python 教程-流程控制:循环结构
linux·服务器·python·算法
迷途之人不知返1 小时前
【基础IO】-5-简单理解三个标准流——stdin、stdout、stderr
linux
牛马鸡niumasi1 小时前
【Linux】进程退出
linux
水饺编程2 小时前
第2章:Linux 基础,mkdir 命令的简单入门
linux·c语言·汇编
自变量yjs2 小时前
Linux --- 线程控制
linux·运维·服务器
陌上花开缓缓归以2 小时前
linux 内核4.4 内存分配使用分析
linux·运维·服务器
欢乐的小猪3 小时前
Linux命令 chmod
linux·运维·服务器