You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Swei-xiao d0602c262b
0.9 OCR转PDF
10 months ago
.idea 0.9 OCR转PDF 10 months ago
PDF 0.9 OCR转PDF 10 months ago
docs 0.9 OCR转PDF 10 months ago
src 0.9 OCR转PDF 10 months ago
README.md 0.9 OCR转PDF 10 months ago
requirements.txt 0.9 OCR转PDF 10 months ago
run.py 0.9 OCR转PDF 10 months ago

README.md

OCRmyPDF GUI

OCRmyPDF的图形用户界面让OCR处理PDF文件变得简单。

功能特点

  • 简洁直观的图形界面
  • 批量处理PDF文件
  • 拖放支持
  • 多语言OCR支持
  • 可自定义OCR选项
  • 保存处理配置

安装要求

  • Python 3.7+
  • OCRmyPDF
  • Tesseract OCR
  • PySide6 (Qt for Python)

安装步骤

  1. 安装OCRmyPDF和其依赖
# macOS
brew install ocrmypdf

# Ubuntu/Debian
apt install ocrmypdf

# 或使用pip
pip install ocrmypdf
  1. 安装GUI依赖
pip install PySide6
  1. 克隆本仓库:
git clone https://github.com/yourusername/OCRmyPDF-GUI.git
cd OCRmyPDF-GUI

安装Tesseract语言包

默认情况下OCRmyPDF只安装英语语言包。要使用其他语言进行OCR需要安装额外的语言包

macOS

# 安装所有语言包
brew install tesseract-lang

# 或者手动安装特定语言包
# 1. 下载语言包文件,例如简体中文:
# https://github.com/tesseract-ocr/tessdata/raw/main/chi_sim.traineddata
# 2. 复制到Tesseract的tessdata目录
# sudo cp chi_sim.traineddata /opt/homebrew/share/tessdata/
# 或
# sudo cp chi_sim.traineddata /usr/local/share/tessdata/

Ubuntu/Debian

# 安装特定语言包,例如简体中文:
sudo apt-get install tesseract-ocr-chi-sim

# 查看所有可用语言包:
apt-cache search tesseract-ocr

Fedora

# 安装特定语言包,例如简体中文:
sudo dnf install tesseract-langpack-chi_sim

# 查看所有可用语言包:
dnf search tesseract

Windows

  1. 从以下网址下载所需语言包文件: https://github.com/tesseract-ocr/tessdata/

  2. 将下载的.traineddata文件放置在Tesseract安装目录的tessdata文件夹中通常位于 C:\Program Files\Tesseract-OCR\tessdata

常用语言代码

  • eng - 英语
  • chi_sim - 简体中文
  • chi_tra - 繁体中文
  • jpn - 日语
  • kor - 韩语
  • fra - 法语
  • deu - 德语
  • rus - 俄语
  • spa - 西班牙语
  • ita - 意大利语

更多信息请参考:OCRmyPDF语言包文档

使用方法

运行启动脚本:

python run.py

或在Windows上双击run.py文件。

开发计划

  • 高级OCR选项
  • 多语言界面
  • 暗黑模式
  • 自定义输出文件名模板
  • 处理历史记录

贡献

欢迎提交Pull Request或Issue。

许可证

本项目采用与OCRmyPDF相同的许可证。

致谢