Byaidu / PDFMathTranslate

PDF scientific paper translation with preserved formats - 基于 AI 完整保留排版的 PDF 文档全文双语翻译,支持 Google/DeepL/Ollama/OpenAI 等服务,提供 CLI/GUI/MCP/Docker/Zotero

Home Page:https://pdf2zh.com

Repository from Github https://github.comByaidu/PDFMathTranslateRepository from Github https://github.comByaidu/PDFMathTranslate

目标语言为日文,韩文时,翻译后的pdf中对应的日韩文字都是空白

Avens666 opened this issue · comments

在提问之前...

  • 我已经搜索了现有的 issues
  • 我在提问题之前至少花费了 5 分钟来思考和准备
  • 我已经认真且完整的阅读了 wiki
  • 我已经认真检查了问题和网络环境无关(包括但不限于Google不可用,模型下载失败)

使用的环境

windows

请选择安装方式

源码

描述你的问题

目标语言为日文,韩文时,翻译后的pdf中对应的日韩文字都是空白

如何复现

随便用文档,目标语言设置为日文,都可以复现
字体是存在的,我调试跟踪,对应的语言字体文件加载是正常的

预期行为

No response

相关 Logs


原始PDF文件

No response

还有别的吗?

No response

commented

我也遇到这个问题
排查:

  • 能提取内容
  • 大模型能翻译出结果(我输出成文本了)
  • 使用pyMuPDF能解析pdf内容。
  • 使用Acrobat查看字体已经嵌入

但是但是但是,使用阅读工具显示大片空白,中文都没显示出来!

英文->中/日/韩
源文件:故事-mono.pdf
(这个源文件是翻译生成的)

我翻譯日文的時候素排的翻譯不了,另外一個翻譯報錯,使用的模型是google和DeepL,使用的版本是windows 64bit版本

補充,我看了字符界面會大量重複報以下錯錯誤,且翻譯進度會卡住:WARNING:pdfminer.pdffont:Could not get FontBBox from font descriptor because
None cannot be parsed as 4 floats
WARNING:pdfminer.pdffont:None cannot be parsed as 4 floats

警告信息:
WARNING:urllib3.connectionpool:InsecureRequestWarning: Unverified HTTPS request is being made to host '127.0.0.1'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings

错误信息:
ERROR:pdf2zh.converter:404 Client Error: Not Found for url: https://api.deepl.com/translate