On Aug 14th 11 PM ET/Aug 15th 03:00 UTC, due to scheduled Firefox Account server maintenance, users may not be able to sign in or create a new subscription. This is expected to last approximately 30 minutes. Status updates can be found at https://status.vpn.mozilla.org or https://status.relay.firefox.com.

Rechercher dans l’assistance

Évitez les escroqueries à l’assistance. Nous ne vous demanderons jamais d’appeler ou d’envoyer un SMS à un numéro de téléphone ou de partager des informations personnelles. Veuillez signaler toute activité suspecte en utilisant l’option « Signaler un abus ».

Learn More

pdf viewer not displaying colors correctly

more options

Hi, I find that recently, my Firefox 102 (on MacOS 12.4, 2019 MBP 16) no longer displays colors correctly in pdf files. For example, in the attached screenshot I compare page 4 of https://arxiv.org/pdf/2201.08431.pdf seen in Firefox and Chrome. Could anyone give me some idea how to fix this issue?

Hi, I find that recently, my Firefox 102 (on MacOS 12.4, 2019 MBP 16) no longer displays colors correctly in pdf files. For example, in the attached screenshot I compare page 4 of https://arxiv.org/pdf/2201.08431.pdf seen in Firefox and Chrome. Could anyone give me some idea how to fix this issue?

Solution choisie

After a few trials, I just figured out that the issue is from this line in my prefs.js:

user_pref("browser.display.background_color", "#feffff");

Once I remove that line and restart Firefox, I can see colors in pdf files again!

Lire cette réponse dans son contexte 👍 0

Toutes les réponses (7)

more options

Seems that I have issues uploading the image to this forum as well... It's stuck at "uploading xxx.png" but never really got uploaded. Here is a link of the screenshot in my original post: https://imgur.com/a/fP9gZ5g

Cela vous a-t-il été utile ?

more options

just upgraded to 102.0.1 and still have this issue

Cela vous a-t-il été utile ?

more options

I discovered one way to force the line chart to the same color as the text, which is to modify the value of the pdfjs.pageColorsForeground preference to a specific color. In the case of the attached screenshot, I set it to pink.

To check on that in your Firefox:

(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button accepting the risk.

More info on about:config: Configuration Editor for Firefox. The moderators would like us to remind you that changes made through this back door aren't fully supported and aren't guaranteed to continue working in the future.

(2) In the search box in the page, type or paste pdfjs.pageColorsForeground and pause while the list is filtered

(3) If the preference is bolded and has a customized value (not "CanvasText") click the reset button at the right end of the row, which looks like a leftward-arching arrow.

The change should be reflected the next time you load (or reload) a PDF.

Was that customized?

Cela vous a-t-il été utile ?

more options

@jscher2000 thanks for the investigation. Unfortunately, my pdfjs.pageColorsForeground is the default CanvasText so this does not solve my issue.

If it's useful, in the pdfjs section I only have these four modified: pdfjs.enabledCache.state=true, pdfjs.ignoreDestinationZoom=true, pdfjs.migrationVersion=2 and pdfjs.migrationVersion=2.

I tried to set these four to false, false, 0, 0, but the no-color issue is still there.

Cela vous a-t-il été utile ?

more options

Thank you for checking that. I don't see any other PDF-specific settings that would change the color of line charts, so it must be some less obvious setting. In recent versions, Firefox's handling of themes and colors has been evolving, but I'm not aware of all the connections. Have you noticed any color scheme changes in your Firefox besides this one?

Cela vous a-t-il été utile ?

more options

Solution choisie

After a few trials, I just figured out that the issue is from this line in my prefs.js:

user_pref("browser.display.background_color", "#feffff");

Once I remove that line and restart Firefox, I can see colors in pdf files again!

Cela vous a-t-il été utile ?

more options

Thanks. There is a fix for this problem in Firefox 104. Until then, enabling "Use system colors" or using a plain white background is the workaround.

Cela vous a-t-il été utile ?

Poser une question

Vous devez vous identifier avec votre compte pour répondre aux messages. Veuillez poser une nouvelle question, si vous n’avez pas encore de compte.