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

相关推荐
IT大白鼠11 分钟前
Linux进程与计划任务管理:技术详解与实战指南
linux·运维·服务器
拾贰_C19 分钟前
【Ubuntu | 公共工作站 | mysql 】 MySQL残留物残留数据
linux·mysql·ubuntu
Ujimatsu40 分钟前
虚拟机安装Ubuntu 26.04.x服务器版(命令行版)(2026.5)
linux·windows·ubuntu
hweiyu001 小时前
Linux命令:arptables
linux·运维
仙柒4152 小时前
管理网络安全
linux·运维·服务器
福尔摩斯·柯南3 小时前
Ubuntu 14.04/16.04/18.04/20.04/22.04/24.04/26.04全系列LTS长期支持版镜像IOS分享
linux·运维·ubuntu
xiaoming00184 小时前
JAVA项目打包部署运维全流程(多服务、批量)
java·linux·运维
浪客灿心4 小时前
Linux五种IO模型与非阻塞IO
linux·网络
洋哥网络科技4 小时前
centos7 升级openssh-10.2
linux·运维·服务器·系统安全
我先去打把游戏先4 小时前
【保姆级图文教程】:VMware虚拟机安装Ubuntu Server 22.04
linux·数据库·ubuntu