翻译后段落背景色(高亮)未完整保留
Author: rickmartin37Created Apr 21, 2026Updated Apr 21, 2026
Labelsbug
Before you submit
- I have searched existing issues
- I spent at least 5 minutes investigating and preparing this report
- I confirmed this is not caused by a network issue
- I have fully read and understood the README
- I am certain that this issue is with BabelDOC itself and can be reproduced through the BabelDOC cli
- I have uploaded the original file, or confirmed that this issue is unrelated to the original file
- I have uploaded the log.
- I confirm that the latest version of BabelDOC is being used.
- I am aware that the issue section of this project is only for submitting bugs that are clearly related to the BabelDOC core, with complete reproduction steps and relevant logs attached.** Otherwise, issues will be closed directly.
Environment
- OS:Ubuntu 22.04.1 LTS
- Python:3.11.14
- BabelDOC:0.5.23Describe the bug
原始 PDF 中部分段落带有黄色背景色(通过 1 1 0 rg 填充矩形实现的高亮效果)。翻译后,这些黄色背景矩形未完整跟随翻译后的段落:
部分高亮区域缺失或覆盖范围与译文不匹配 预期行为:翻译后的文本应保留与原文相同的背景色区域,高亮矩形应随译文位置和长度自动调整。
Steps to Reproduce
- 打开任意一个word,输入一个需要换行的长段落,选择背景色,导出为pdf 2.进行翻译
Expected Behavior
翻译后的段落应保留原始的黄色背景高亮,且高亮区域应与译文范围一致。
Relevant Log Output or Screenshots
Original PDF File
No response
Additional Context
No response
Source: funstory-ai/BabelDOC