# OCRmyPDF助手 **Repository Path**: CHINA-AI/ocr-pdf-assistant ## Basic Information - **Project Name**: OCRmyPDF助手 - **Description**: 一款简单易用的PDF文字识别工具,让扫描版PDF秒变可搜索文档! ## ✨ 特性 - 🖥️ 简洁的图形界面,小白也能轻松上手 - 🔍 支持多语言识别(简体中文、繁体中文、英语、日语) - 🛠️ 智能优化功能(自动纠偏、图像清理、自动旋转) - 🚀 多线程处理,速度更快 - 📄 支持PDF/A-2标准输出 - 💫 完全免费开源 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2025-05-03 - **Last Updated**: 2025-05-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README 我来帮你写一个适合GitHub的项目说明文档: ```markdown # PDF OCR 助手 [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) ![Python Version](https://img.shields.io/badge/python-3.6%2B-blue) ![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20Linux%20%7C%20macOS-lightgrey) 一款简单易用的PDF文字识别工具,让扫描版PDF秒变可搜索文档! ## ✨ 特性 - 🖥️ 简洁的图形界面,小白也能轻松上手 - 🔍 支持多语言识别(简体中文、繁体中文、英语、日语) - 🛠️ 智能优化功能(自动纠偏、图像清理、自动旋转) - 🚀 多线程处理,速度更快 - 📄 支持PDF/A-2标准输出 - 💫 完全免费开源 ## 🔧 安装指南 ### 1. 安装必要组件 #### Windows用户 1. 安装Python (3.6或更高版本) ```bash # 访问 https://www.python.org/downloads/ 下载安装 ``` 2. 安装Tesseract OCR引擎 ```bash # 方法1:使用winget(Windows 10/11) winget install tesseract-ocr # 方法2:下载安装包 # 访问 https://github.com/UB-Mannheim/tesseract/wiki 下载安装 ``` #### Linux用户 ```bash # Ubuntu/Debian sudo apt-get update sudo apt-get install -y python3-pip tesseract-ocr tesseract-ocr-chi-sim tesseract-ocr-chi-tra tesseract-ocr-jpn # CentOS/RHEL sudo yum install -y python3-pip tesseract tesseract-langpack-chi_sim tesseract-langpack-chi_tra tesseract-langpack-jpn ``` #### macOS用户 ```bash # 使用Homebrew安装 brew install python tesseract tesseract-lang ``` ### 2. 克隆项目 ```bash git clone https://github.com/你的用户名/pdf-ocr-helper.git cd pdf-ocr-helper ``` ### 3. 安装Python依赖 ```bash pip install -r requirements.txt ``` ## 🚀 快速开始 1. 运行程序: ```bash python pdf_ocr_gui.py ``` 2. 在界面中: - 点击"浏览"选择需要处理的PDF文件 - 选择输出位置 - 选择识别语言 - 根据需要调整处理选项 - 点击"开始处理" ## 📝 使用建议 1. **语言选择**: - 处理中文文档选择`chi_sim`(简体)或`chi_tra`(繁体) - 处理英文文档选择`eng` - 处理日文文档选择`jpn` - 混合语言文档建议选择主要语言 2. **性能优化**: - 处理线程数建议设置为CPU核心数的一半 - 大文件处理时建议关闭"图像清理"选项 - 如果识别质量不理想,可以尝试开启"强制OCR"选项 3. **输出选择**: - 一般使用建议选择`PDF/A-2`格式 - 如果文件体积过大,可以选择普通PDF格式 ## 🤝 贡献指南 欢迎提交 Issue 和 Pull Request! 1. Fork 本仓库 2. 创建你的特性分支 (`git checkout -b feature/AmazingFeature`) 3. 提交你的改动 (`git commit -m 'Add some AmazingFeature'`) 4. 推送到分支 (`git push origin feature/AmazingFeature`) 5. 发起 Pull Request ## 📄 开源协议 本项目采用 MIT 协议开源,详见 [LICENSE](LICENSE) 文件。 ## 🙏 致谢 - [OCRmyPDF](https://github.com/jbarlow83/OCRmyPDF) - [Tesseract OCR](https://github.com/tesseract-ocr/tesseract) ## 📬 联系方式 如有问题或建议,欢迎: - 提交 [Issue](https://github.com/你的用户名/pdf-ocr-helper/issues) - 发送邮件至:[你的邮箱] ## ⭐ 支持项目 如果这个项目对你有帮助,欢迎: 1. 给项目点个 Star ⭐ 2. 向你的朋友推荐这个项目 📢 ``` 同时,我建议你还需要创建以下文件: 1. requirements.txt 文件内容: ``` ocrmypdf>=14.0.0 tkinter ``` 2. .gitignore 文件内容: ``` # Python __pycache__/ *.py[cod] *$py.class *.so .Python build/ develop-eggs/ dist/ downloads/ eggs/ .eggs/ lib/ lib64/ parts/ sdist/ var/ wheels/ *.egg-info/ .installed.cfg *.egg # Virtual Environment venv/ ENV/ env/ # IDE .idea/ .vscode/ *.swp *.swo # Operating System .DS_Store Thumbs.db ``` 3. LICENSE 文件(MIT许可证): ``` MIT License Copyright (c) [2025] [李清波] Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ```