fix(docx): render floating picture rotation - #1402
Merged
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
a:xfrm/@rotin the image IR.Related issue
Related: #1366
Testing
cargo test -p office2pdf --lib parser::docx::tests::image_tests::docx_floating_picture_rotation_reaches_ir_and_typst -- --exact --nocapturecargo fmt --all -- --checkcargo check --workspacecargo clippy --workspace --all-targets -- -D warningsOFFICE2PDF_VALIDATE_PDF=1 cargo test --workspacecargo check --target wasm32-unknown-unknown -p office2pdfcargo check --target wasm32-unknown-unknown -p office2pdf --features wasmcargo check --target wasm32-unknown-unknown -p office2pdf --features wasm-cjk-fontwasm-pack build crates/office2pdf --target web --features wasmwasm-pack test --node --features wasm(10 passed)wasm-pack build crates/office2pdf --target web --features wasm-cjk-fontwasm-pack test --node --features wasm-cjk-font(11 passed)python3 scripts/compare_render.py --page 1 --dpi 150 --artifacts-dir /tmp/office2pdf-issue-1366.HDrLbu/after-pivot-audit --audit /tmp/office2pdf-issue-1366.HDrLbu/gt.pdf /tmp/office2pdf-issue-1366.HDrLbu/after-pivot.pdf(expected nonzero; remaining clusters dispositioned below)python3 scripts/compare_layout.py --audit /tmp/office2pdf-issue-1366.HDrLbu/gt.pdf /tmp/office2pdf-issue-1366.HDrLbu/after-pivot.pdf(expected nonzero; every large text-instance shift dispositioned below)validate_evidencecheck fromscripts/check_visual_pr.pyPASSVisual impact
Visual audit
Place your event title here.docxpdftoppmand ImageMagick, 150 DPIfixassets/bugfixes/issue-1366/gt.jpgassets/bugfixes/issue-1366/before.jpgassets/bugfixes/issue-1366/after.jpgVisual comparison
At 150 DPI, the 5% fuzz absolute-error count decreased from 1,539,170 before the fix to 1,357,860 after it. The output retains the same two Letter pages as the GT.
Required inspection
Deviation audit
tx/bgaliases; no photo color transform changedThe page-1 hairline inventory contains the thin white circle and small triangle outlines; they remain present, with their transform deviations tracked in #1365. The dot fields are filled custom geometry rather than dashed strokes and remain tracked in #1363. The photo region contains no hairline, border, bold, italic, or underlined element.
Checklist
Signed-off-byline