Skip to content

fix(detect): Skip dark images drawn behind visible text#213

Closed
mlissner wants to merge 2 commits into
2-detect-toc-bookmark-leaks-20260407from
fix-image-behind-text-false-positive-20260412
Closed

fix(detect): Skip dark images drawn behind visible text#213
mlissner wants to merge 2 commits into
2-detect-toc-bookmark-leaks-20260407from
fix-image-behind-text-false-positive-20260412

Conversation

@mlissner
Copy link
Copy Markdown
Member

Summary

  • Fix false positives from dark images in the PDF structure that are drawn behind other elements (form backgrounds, template layers)
  • After confirming the raw image is dark and unicolor, now also renders the page at that location — if the rendered result isn't dark, the image is behind other elements and not hiding anything
  • Caught on a real-world bankruptcy form where dark images appeared under the "Revised 05/01/2019" and "Page N" footer text

Test plan

🤖 Generated with Claude Code

mlissner and others added 2 commits April 12, 2026 09:13
Some PDFs have dark images in the structure that are drawn behind
other elements (form backgrounds, template layers). The text is
fully visible on the rendered page.

After confirming the raw image is dark, now also render the page
at that location. If the rendered result isn't dark, the image is
behind other elements and not hiding anything.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@mlissner
Copy link
Copy Markdown
Member Author

Folded into #211 — the page-render approach and image_behind_text test are now in that PR directly.

@mlissner mlissner closed this Apr 12, 2026
@mlissner mlissner deleted the fix-image-behind-text-false-positive-20260412 branch April 12, 2026 16:23
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.

1 participant