Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

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?

Giải pháp được chọn

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!

Đọc câu trả lời này trong ngữ cảnh 👍 0

Tất cả các câu trả lời (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

Hữu ích?

more options

just upgraded to 102.0.1 and still have this issue

Hữu ích?

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?

Hữu ích?

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.

Hữu ích?

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?

Hữu ích?

more options

Giải pháp được chọn

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!

Hữu ích?

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.

Hữu ích?

Đặt một câu hỏi

Bạn phải đăng nhập vào tài khoản của bạn để trả lời bài viết. Vui lòng bắt đầu một câu hỏi mới, nếu bạn chưa có tài khoản.