Closed Bug 1722191 Opened 3 years ago Closed 3 years ago

French COVID QRcode (in PDF) unreadable due to blurry rendering in PDF.js

Categories

(Firefox :: PDF Viewer, defect)

Firefox 90
defect

Tracking

()

VERIFIED FIXED
94 Branch
Tracking Status
firefox-esr78 --- wontfix
firefox-esr91 --- fixed
firefox92 --- wontfix
firefox93 --- fixed
firefox94 --- verified

People

(Reporter: karimbakkal, Assigned: bdahl)

References

Details

Attachments

(3 files)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0

Steps to reproduce:

Download a QR code in PDF format from covid site app and try to read it. (Tried on Ubuntu 20.04)

Actual results:

The QRcode edges is not sharp enough. The blurred cause reading issue (screen and printer).

May be related to others bugs like 1654612 or 1720819 but not sure about it.

Expected results:

The QRcode edges must be sharp in order to be readable without error even after printing it.

Perfect with Adobe Acrobat and Atril

The Bugbug bot thinks this bug should belong to the 'Firefox::PDF Viewer' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → PDF Viewer

Hi karimbakkal!
Please, could you share with us the URL where you are downloaded the QR Code?
Also, please if it is possible for you, add some screen recording or screenshots showing us where the problem is. It might help us to reproduce it.
Thanks!

Flags: needinfo?(karimbakkal)
Flags: needinfo?(karimbakkal)

Thank you for providing me with the screenshot. I've tried a couple of PDFs from different sources but I was unable to see the code blurred on my end. I tested this on windows 10 using latest Nightly 93.0a1. It might be possible to be related to or duplicated to this bug 1654612.

Depends on: 1654612
No longer depends on: 1654612

I was unable to reproduce it. I'll set component to have a starting point from this.

Component: PDF Viewer → Printing: Output
Product: Firefox → Core

I tried with LibreOffice Draw 1:6.4.7-0ubuntu0.20.04.1 in order to see if i can have more information about how the QR-Code is Drawn and it's seem to have the same issue.
I will try to found an PDF editor which can give us more information.

There have been some printing-related fixes since Firefox 90, so if you could try the current Nightly (see https://www.mozilla.org/en-US/firefox/channel/desktop/#nightly) and confirm whether the problem still occurs, that would be helpful.

If the issue is still happening, please also attach an example of these PDF files so that we can reproduce exactly what you're seeing. Thanks!

Flags: needinfo?(karimbakkal)

No changes with the Nightly 93.0a1 (2021-08-24) . The QR code is not sharp at screen and the laser printer add defects when it try to print greyed area.

The QR code seems contain private data so you can understand why i can't upload it.

Maybe it can be related with these issue : https://github.com/mozilla/pdf.js/issues?q=is%3Aissue+is%3Aopen+label%3A4-image-conversion+

Flags: needinfo?(karimbakkal)

OK, thank you for trying Nightly. We'll need to investigate further.

Do you have access to either a Windows or macOS machine? If so, it would be useful to know if the same problem happens there, or if it is Linux-only.

I had just try on a Windows 10 machine with the nightly, it's the same thing.

Hi! I've got a few clarifying questions -- note that there's likely to be some particular special thing about the PDF involved here (this probably doesn't affect all PDFs with QR codes), so the more detail we can capture to try to investigate or reproduce the issue, the better.

(1) What's the website involved here? (you mentioned "a covid site")

(2) When you say "Download a QR Code in PDF format": are you using the browser's Print | Save to PDF functionality to do this, or are you talking about a PDF file that the website provides to you to directly download, and you're using Firefox to view that PDF? (I see you mentioned PDF.js; if this is specifically an issue with Firefox's rendering of a PDF that has been generated elsewhere, then you're probably right that this is a bug in PDF.js, I think, and we probably need to recategorize it accordingly.)

Flags: needinfo?(karimbakkal)

Oops wrong link.

  1. The website is : https://sidep.gouv.fr/
    Maybe you can asking them a sample or more info about how they generate it.

  2. I download the file directly from the website. It doesn't have rendering issue in Atril, Acrobat. The rendering issue is only present if i use the browser as a viewer. From site or from file on hard disk doesn't change anything.

I think there is an relation with this PDF.js issue : https://github.com/mozilla/pdf.js/issues/9713

The example is larger but trouble seem similar : https://github.com/mozilla/pdf.js/files/1991319/image_via_1.3_001.pdf

PDF.js seem to interpolate even if it's not require and it's may the root cause of the trouble i had with the QR code from this website.

Flags: needinfo?(karimbakkal)

Thanks. I don't know enough about PDF.js internals to be of much help, but I'll reclassify to the appropriate component, and hopefully someone familiar with the PDF Viewer implementation (pdf.js) can pick it up over there. (I'll add a note on that github issue, too.)

Component: Printing: Output → PDF Viewer
Product: Core → Firefox
Summary: QRcode in PDF unreadable → French COVID QRcode (in PDF) unreadable due to blurry rendering in PDF.js
Flags: needinfo?(bdahl)
Commit merged into master by GitHub Authored by Jonas Jenwald (Snuffleupagus)
Depends on: 1730725
Assignee: nobody → bdahl
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

karimbakkal, could you test with Firefox Nightly? The bug should be fixed.

Flags: needinfo?(bdahl) → needinfo?(karimbakkal)

It's ok for screen and printing with the nightly 94.0a1 (2021-09-15) (64-bit).

You can mark the ticket as "solved".

Flags: needinfo?(karimbakkal)
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED

(In reply to karimbakkal from comment #19)

It's ok for screen and printing with the nightly 94.0a1 (2021-09-15) (64-bit).

You can mark the ticket as "solved".

Hi karimbakkal! I see that you've already verified this issue on Nightly 94.0a1, and confirmed as fixed. I've tried to reproduce the bug with the pdf linked in https://github.com/mozilla/pdf.js/issues/9713, since I cannot generate a french QR code mentioned in comment 12. However on the fixed builds (with Win 10), the colors look different when pdf is printed, so it doesn't seem to be related with this issue.

Could you please double check on Beta 94 as well, just to make sure that everything is OK?

Flags: needinfo?(karimbakkal)

For the QR Code : i confirmed the issue is solved with beta 94 (tested on Windows 10 and xUbuntu 20.04.3) in the viewer and in my black and white laser printer.

For the printing issue with file "image_via_1.3_001.pdf", i had test with an old "defective" laser color printer :

  • with xUbuntu : seems OK. We can found both interpolated and non interpolated
  • with Windows 10 : interpolation doesn't work at all. Both part are non interpolated.

Cant tell about color calibration, that's the reason why i never use this color printer.

Flags: needinfo?(karimbakkal)

(In reply to karimbakkal from comment #21)

For the printing issue with file "image_via_1.3_001.pdf", i had test with an old "defective" laser color printer :

  • with xUbuntu : seems OK. We can found both interpolated and non interpolated
  • with Windows 10 : interpolation doesn't work at all. Both part are non interpolated.

Cant tell about color calibration, that's the reason why i never use this color printer.

Could you file a separate bug for this problem?

(In reply to Marco Castelluccio [:marco] from comment #22)

Could you file a separate bug for this problem?

If Ciprian Georgiu, which have discover this bug, didn't file it, i can do it if you wish.

I will be useless without a good color printer.

:ciprian_georgiu, could you file the bug?

Flags: needinfo?(ciprian.georgiu)

(In reply to Marco Castelluccio [:marco] from comment #24)

:ciprian_georgiu, could you file the bug?

Yes, filed in https://bugzilla.mozilla.org/show_bug.cgi?id=1737774.

I'm going to close this as verified fixed per comment 21, since the QR code issue doesn't reproduce anymore.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
Flags: needinfo?(ciprian.georgiu)
Depends on: 1741445
Target Milestone: --- → 94 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: