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 分钟前
Linux —— 线程池(1)
linux
卧室小白9 分钟前
K8S-Pod基本配置
linux·运维·服务器
yyuuuzz9 分钟前
谷歌云基础服务的入门认知
linux·运维·服务器·数据库·人工智能·github
煜声远播18 分钟前
相册卡顿的系统级排查复盘:fsync 不要在锁里调用
linux
syagain_zsx30 分钟前
Linux进程全面解析:从基础到高级管理(2/3)
linux·运维·服务器
Irissgwe40 分钟前
8-1\IP 分片和组装的具体过程
linux·网络·tcp/ip·网络层·分片·组装
Zevalin爱灰灰1 小时前
makefile从入门到实战 第一章 认识makefile(一)
linux·makefile
Shadow(⊙o⊙)1 小时前
进程间通信0.0-pipe()匿名管道,详细分析进程池调度队列执行逻辑,进程池模拟实现。
linux·运维·服务器·开发语言·c++
CQU_JIAKE1 小时前
6.6aaaaaa
linux·运维·服务器
Apibro1 小时前
【Linux】Qt Creator 中文输入法
linux·qt