Skip to content

fix(pptx): omit fully occluded searchable text - #1445

Merged
developer0hye merged 1 commit into
mainfrom
fix/issue-1432-occluded-text-layer
Aug 31, 2026
Merged

fix(pptx): omit fully occluded searchable text#1445
developer0hye merged 1 commit into
mainfrom
fix/issue-1432-occluded-text-layer

Conversation

@developer0hye

Copy link
Copy Markdown
Owner

Summary

  • omit an earlier wrapping, upright PPTX text box from generated PDF markup only when a later opaque, untransformed raster covers both the page and the text frame
  • preserve text for partial-page images, transparent rasters, rotated boxes, and no-wrap boxes whose glyphs can escape their declared frame
  • add a PDF-level searchable-text regression and strengthen the visual contract so Text-layer-only: Yes requires real zero decoded-pixel difference between before.jpg and after.jpg
  • document and store the text-layer-only evidence workflow for page 1 of the reported deck

Related issue

Fixes #1432

Testing

  • Red first: cargo test -p office2pdf render::typst_gen::tests::fixed_page_tests::test_fixed_page_omits_text_fully_occluded_by_later_opaque_jpeg retained Sensitivity: in generated markup before the implementation.
  • Red first: python3 -m unittest scripts.tests.test_check_visual_pr.LayoutAuditTests.test_text_layer_only_fix_rejects_different_decoded_before_and_after_images showed 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.
  • Converted the reported PPTX with the rebuilt CLI; pdftotext -layout no longer contains Sensitivity: Internal on 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).
  • Re-rendered the current page at 300 DPI, encoded it with the evidence settings, and compared it to committed after.jpg — decoded-pixel AE 0 (0).

Visual impact

  • No rendered PDF change
  • Rendered PDF change or visual evidence added

Visual audit

  • Issue: PPTX fully occluded footer text remains searchable in exported PDF #1432
  • Fixture: GENERAL SERVICES.pptx reported through PPTX table cell fills lose transparency over a slide photograph #1371
  • Page(s): 1
  • Renderer and DPI: pdftoppm, 300 DPI
  • Evidence mode: fix
  • Text-layer-only: Yes
  • Pixel delta: 0
  • Layout audit report: assets/bugfixes/issue-1432/layout-audit.json
  • Layout audit page count: Pass
  • Layout audit text flow: Pass
  • Layout audit large shifts: Pass
  • New follow-up issues found in this audit: None
  • Model vision findings: At 300 DPI Codex inspected the full GT, before, and after pages, the 5% fuzz diff, and matched footer, title, and rule crops. The footer has no painted pixels in either before or after, and those two renders are decoded-pixel identical. Remaining GT/output edge clusters are limited to text and rule antialiasing or subpixel rasterization below the audit thresholds; no untracked visible deviation remains on page 1.
  • GT: assets/bugfixes/issue-1432/gt.jpg
  • Before: assets/bugfixes/issue-1432/before.jpg
  • After: assets/bugfixes/issue-1432/after.jpg

Visual comparison

GT Before After
GT Before After

Required inspection

  • Rendered all evidence at 150 DPI or higher
  • Stored progressive JPEG quality 86 assets with metadata stripped
  • Used Codex/Claude vision to inspect the full GT/output pages, diff, and matched crops
  • Inspected matched region crops at full resolution
  • Ran compare_layout.py --audit and dispositioned every large text-instance shift and painted-visibility mismatch
  • Ran the 5% fuzz pixel-difference sweep
  • Inventoried hairlines and border dash styles
  • Inventoried font weight, italic, and underline emphasis

Deviation audit

Check Result
Page count/order Matches GT — one compared page in the page-1 audit
Element presence Fixed — the fully covered footer is absent from the searchable layer and remains absent from the pixels
Position/size No deviation observed — before/after pixels are identical; GT text baselines and x/width deltas remain below audit thresholds
Rotation/flip Matches GT — no rotated or flipped page-1 element differs
Fill Matches GT — no before/after pixel changed
Stroke/border No deviation observed — the title rule remains present; only accepted rasterization edge noise appears against GT
Shape outline geometry Matches GT — no outline geometry changed
Text content Fixed — Sensitivity: Internal is no longer extra searchable text; the three visible lines still match GT
Font family/weight/style No deviation observed — full-resolution text crops retain the same visible styling
Text color Matches GT — no before/after pixel changed
Alignment No deviation observed — matched text remains within the layout audit thresholds
Line/paragraph spacing No deviation observed — no wrap or reflow finding remains
Clipping/overflow Fixed — fully occluded wrapping text is culled conservatively while no-wrap, rotated, partial-cover, and transparent-cover cases stay searchable

Checklist

  • Commits include a Signed-off-by line
  • PR scope contains one root cause
  • Remaining visual deviations each reference an open issue

Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
@developer0hye
developer0hye merged commit 3c541f3 into main Aug 31, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PPTX fully occluded footer text remains searchable in exported PDF

1 participant