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.
|
|
7 months ago | |
|---|---|---|
| .idea | 7 months ago | |
| 7 months ago | ||
| docs | 7 months ago | |
| src | 7 months ago | |
| README.md | 7 months ago | |
| requirements.txt | 7 months ago | |
| run.py | 7 months ago | |
README.md
OCRmyPDF GUI
OCRmyPDF的图形用户界面,让OCR处理PDF文件变得简单。
功能特点
- 简洁直观的图形界面
- 批量处理PDF文件
- 拖放支持
- 多语言OCR支持
- 可自定义OCR选项
- 保存处理配置
安装要求
- Python 3.7+
- OCRmyPDF
- Tesseract OCR
- PySide6 (Qt for Python)
安装步骤
- 安装OCRmyPDF和其依赖:
# macOS
brew install ocrmypdf
# Ubuntu/Debian
apt install ocrmypdf
# 或使用pip
pip install ocrmypdf
- 安装GUI依赖:
pip install PySide6
- 克隆本仓库:
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
-
从以下网址下载所需语言包文件: https://github.com/tesseract-ocr/tessdata/
-
将下载的
.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相同的许可证。
致谢
- OCRmyPDF - 强大的OCR工具
- Tesseract OCR - OCR引擎
- Qt for Python (PySide6) - GUI框架