fix(pptx): omit fully occluded searchable text - #1445
Merged
Conversation
Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
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.
Summary
no-wrapboxes whose glyphs can escape their declared frameText-layer-only: Yesrequires real zero decoded-pixel difference betweenbefore.jpgandafter.jpgRelated issue
Fixes #1432
Testing
cargo test -p office2pdf render::typst_gen::tests::fixed_page_tests::test_fixed_page_omits_text_fully_occluded_by_later_opaque_jpegretainedSensitivity:in generated markup before the implementation.python3 -m unittest scripts.tests.test_check_visual_pr.LayoutAuditTests.test_text_layer_only_fix_rejects_different_decoded_before_and_after_imagesshowed that the initial declaration-only exception accepted different rasters.cargo test -p office2pdf render::typst_gen::tests::fixed_page_tests— 20 passed on the rebased head, including PDF text extraction and the partial/transparent/no-wrap safety cases.python3 -m unittest scripts.tests.test_check_visual_pr— 42 passed.CARGO_TARGET_DIR=/Volumes/T7/targets/office2pdf-issue-1432 cargo clippy --workspace --all-targets -- -D warnings— passed on the rebased head.OFFICE2PDF_VALIDATE_PDF=1 CARGO_TARGET_DIR=/Volumes/T7/targets/office2pdf-issue-1432 cargo test --workspace— passed before the conflict-free rebase: core 2,753; DOCX 188; PDF validation 7; PPTX 130; XLSX 206; CLI, package roundtrip, model roundtrip, and doctests all passed with zero failures. Focused tests and clippy were then repeated after the rebase.pdftotext -layoutno longer containsSensitivity: Internalon page 1 while the visible title remains searchable.python3 scripts/compare_layout.py --page 1 --audit --json native-powerpoint.pdf office2pdf.pdf— page count 1/1, missing 0, extra 0, reflow 0, visibility mismatches 0, large shifts 0.magick compare -metric AE assets/bugfixes/issue-1432/before.jpg assets/bugfixes/issue-1432/after.jpg null:—0 (0).after.jpg— decoded-pixel AE0 (0).Visual impact
Visual audit
GENERAL SERVICES.pptxreported through PPTX table cell fills lose transparency over a slide photograph #1371pdftoppm, 300 DPIfixassets/bugfixes/issue-1432/layout-audit.jsonassets/bugfixes/issue-1432/gt.jpgassets/bugfixes/issue-1432/before.jpgassets/bugfixes/issue-1432/after.jpgVisual comparison
Required inspection
Deviation audit
Sensitivity: Internalis no longer extra searchable text; the three visible lines still match GTChecklist
Signed-off-byline