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

相关推荐
狮子再回头2 分钟前
relhat9.1 sshd配置
linux·服务器·网络
烁34744 分钟前
liunx命令不完整版
linux·运维·服务器
vsropy1 小时前
cmake版本不对不能直接删/无法source
linux·运维·服务器
xcLeigh1 小时前
鸿蒙平台 gThumb 图片查看器适配实战:从 Linux GTK 到 Electron 鸿蒙壳工程
linux·electron·harmonyos·gnome·桌面环境·gthumb
wuminyu1 小时前
Java世界中StringTable源码剖析
java·linux·c语言·jvm·c++
宇晨T4 小时前
BurpSuite实战:WackoPicko敏感目录探测
linux·运维·服务器
月巴月巴白勺合鸟月半4 小时前
在Linux下开发桌面程序
linux·运维·服务器
zh路西法5 小时前
【tmux入门】终端分屏、SSH远程守护与一键启动脚本
linux·运维·ssh·bash
qq_163135755 小时前
Linux 【03-pwd命令超详细教程】
linux
学途路漫漫5 小时前
Ubuntu 24.04 国内网络环境全面优化指南
linux·网络·ubuntu