Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

pdf viewer not displaying colors correctly

  • 7 பதிலளிப்புகள்
  • 3 இந்த பிரச்னைகள் உள்ளது
  • 1 view
  • Last reply by jscher2000 - Support Volunteer

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?

தீர்வு தேர்ந்தெடுக்கப்பட்டது

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!

Read this answer in context 👍 0

All Replies (7)

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

just upgraded to 102.0.1 and still have this issue

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?

@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.

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?

தீர்வு தேர்ந்தெடுக்கப்பட்டது

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!

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.