Conversation
|
✅ OpenCodeReview: Review partially complete: 0 finding(s); 6 of 7 selected item(s) failed. |
Owner
Author
|
已在 a98fd91 处理审查意见:修复无效页码编辑导致切换 PDF 异常、导出权限回归和 CLI 越界报错;合并重复的页数读取、补充错误日志和校验;将新增 GUI 文案接入 Qt 翻译,并明确负页差时的手动操作。相关回归测试已补齐。当前测试为 60 passed、1 个既有失败(tests/test_convert.py::test_convert_dir_text,相关代码相对 origin/master 未改动)。 Windows 句柄那条未改:当前使用的 pypdf 3.17.4 在 PdfReader(path) 内通过 with open 读取到 BytesIO,随后立即关闭文件句柄;这里不会因 reader 持有临时文件句柄而阻止 os.replace。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #60
When the first body page is physical PDF page 31, exporting a directory now writes both the chapter outline targeting page 31 and PDF page labels that display that page as
1(xxxon page 30,1on page 31). Existing page labels, including custom prefixes and multiple ranges, are preserved by default.The GUI adds a reader-page-number option beside page offset, with an inferred or manually selected body start. The CLI exposes the same behavior through
--page-labels roman-bodyand optional--body-start-page. Export validates page targets and labels, checks that the source did not change during writing, and replaces an existing output only after a verified temporary PDF is ready. The GUI confirms replacement, routes both typed paths and the Open dialog through the same unsaved-draft decision, and reports the final export status.Validation:
tests/test_convert.py::test_convert_dir_textalso fails on unmodifiedorigin/master.pypdf 3.17.4dependency (10 passed).1, and the chapter outline targets physical page 31.