一个使用layout overlay方式实现PDF英文翻译为中文的免费工具,使用智普api来完成ocr和翻译功能
chaodreaming开源PDF翻译工具(英语转中文)使用glm-4v-flash
glm-4v-flash免费并且10QPS,实测速度约为10s/页
api_key注册:https://open.bigmodel.cn/usercenter/proj-mgmt/apikeys
开源地址:https://github.com/chaodreaming/layover-pdf
modelscope测试:https://www.modelscope.cn/studios/chaodreaming/layover-pdf/summary
modelscope无法承受很大的并发,当无法使用时可以自行在本地构建使用app.py
git clone https://github.com/chaodreaming/layover-pdf
cd layover-pdf
pip install -r requirements.txt
python3 app.py
http://localhost:9000/
python main.py --input_pdf pdf_pat/img_path --api_key xxx --pages 100
docker build -t layover-pdf .
docker run -p 9000:9000 --gpus=all -it layover-pdf /bin/bash
2025.3.18 新增支持img和打印log进度
2025.3.16上线PDF保留布局翻译功能,目前支持英译中
TODO
This project currently uses PyMuPDF to achieve advanced functionality. However, since it adheres to the AGPL license, it may impose restrictions on certain usage scenarios. In future iterations, we plan to explore and replace it with a more permissive PDF processing library to enhance user-friendliness and flexibility.
