sumatrapdfreader / sumatrapdf

SumatraPDF reader
http://www.sumatrapdfreader.org
GNU General Public License v3.0
12.99k stars 1.67k forks source link

certain PDFs with an image layered below a mask layered below text, ignore the mask #4127

Open caribet42 opened 4 months ago

caribet42 commented 4 months ago

SumatraPDF version

Describe the bug I have received a couple of PDFs which render correctly in Adobe, Foxit, Brave/Chrome, etc. If Sumatra, they don't. Each problem page has an image which extends over much of the page and below much of the text, but when rendered correctly that image should be masked/clipped so that most of the image does not show. In Sumatra, it incorrectly shows the whole image. The fault survives compression by ilovepdf.com

To Reproduce Steps to reproduce the behavior:

  1. Open attached PDF, go to page 2 or page 7
  2. Page 2 is best - the text is very hard to read because of the image beneath the text

Expected behavior Open in Adobe or Foxit or Chrome. Look at same page. Not the visual difference.

File that reproduces the problem The prophecies of the professor_compressed.pdf

Screenshots If applicable, add screenshots to help explain your problem. PDF - wrong - Sumatra PDF - OK - Chrome

Additional context Add any other context about the problem here.

kjk commented 4 months ago

verified happens on master probably same as https://github.com/sumatrapdfreader/sumatrapdf/issues/4064

caribet42 commented 3 months ago

there is a change in behaviour between released version v3.5.2 and pre-release v3.6.16007. Unfortunately it is wrong. Specifically it addressed the matter of the fade mask, but the mask is inverted. The capture from Adobe (above) shows the correct view, with a mask reveal at the bottom of the page and clear area (showing text) at the top. I have some other files where the mask reveals L-to-R and again the reveal is inverted in 3.6.16007

Attached screenshot of same file referred to above, but captured in 3.6.16007 Screenshot 2024-04-06 114606

kjk commented 3 months ago

the best thing to do is to report this to mupdf developers: https://bugs.ghostscript.com/

GitHubRulesOK commented 3 months ago

image

for convenience this should be single page with similar construct ?

Page2mupdf.pdf