mozilla / pdf.js

PDF Reader in JavaScript
https://mozilla.github.io/pdf.js/
Apache License 2.0
47.09k stars 9.81k forks source link

PDF rendering error #18310

Closed tariqul-islam closed 1 week ago

tariqul-islam commented 1 week ago

Attach (recommended) or Link to PDF file here: Happens wit all the PDFs.

Configuration:

RELEASE=20.1 CODENAME=ulyssa EDITION="MATE" DESCRIPTION="Linux Mint 20.1 Ulyssa" DESKTOP=Gnome TOOLKIT=GTK

Steps to reproduce the problem:

  1. Opening any PDF with the browser.

What is the expected behavior? (add screenshot) White background, legible fonts.

What went wrong? (add screenshot) Screenshot at 2024-06-20 22-06-48

Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension):

timvandermeij commented 1 week ago

If this happens with every PDF it's most likely an issue in the browser and not in PDF.js, so it'll likely not be possible to fix it here. Could you try starting Firefox with a fresh profile, see https://support.mozilla.org/en-US/kb/refresh-firefox-reset-add-ons-and-settings, since this could be caused by e.g. browser settings that are different from the defaults? Otherwise, please try updating graphics drivers or toggling hardware acceleration as those can also be causes of rendering defects.

jwoertink commented 1 week ago

This happens to me too. One thing I noticed though is it starts happening after I've had Firefox running for a while. For example, yesterday I couldn't open a single PDF. Every single one just would render a black screen with blue boxes where text or input fields were. Then this morning I closed the browser and reopened, and now I can see all of those same PDFs. I'll update this comment with a screenshot once it starts happening again. I'm running 127.0 (64-bit) Linux

periodic commented 1 week ago

I had this same issue and can confirm that restarting Firefox fixed it for me. All PDFs were having these rendering artifacts just like the screenshots above (various manuals, a paper from Arxiv, documents from my health provider).

Browser: 126.0.1 (what I first upgraded to) / 127.0 (current) Install Type: dpkg from repositories OS: Pop!_OS 22.04 LTS Windowing System: X11 GNOME Version: 42.9 Graphics: NVIDIA 550.67

Is it possible that I was on an older version and restarting updated it? I did another system upgrade and that didn't seem to harm anything. I'll report back if it starts happening again.

calixteman commented 1 week ago

You should file a bug in Firefox itself: https://bugzilla.mozilla.org/enter_bug.cgi?product=Core&component=Graphics%3A%20Canvas2D. It isn't related to pdf.js itself.