corona-warn-app / cwa-documentation

Project overview, general documentation, and white papers. The CWA development ends on May 31, 2023. You still can warn other users until April 30, 2023. More information:
https://coronawarn.app/en/faq/#ramp_down
Apache License 2.0
3.28k stars 344 forks source link

Suggestion to modify DE EU Digital Covid Vaccination Certificate format #644

Closed MikeMcC399 closed 3 years ago

MikeMcC399 commented 3 years ago

Avoid duplicates

Technical details

App device independent

Describe the bug

If the German version of the EU Digital Covid Vaccination Certificate is printed badly then the QR code may not be readable and the Corona-Warn-App may be unable to add a vaccination certificate.

Steps to reproduce the issue

Obtain an EU Digital Covid Vaccination Certificate which cannot be scanned by CWA (see for instance https://github.com/corona-warn-app/cwa-app-android/issues/3514).

Expected behavior

All EU Digital Covid Vaccination Certificate officially printed by German organizations (Vaccination centers, pharmacies, doctors, etc.) should be reliably readable by the Corona-Warn-App.

Possible Fix

Summary:

  1. Position of the QR code is too close to the edge edge of paper -> reposition away from the edge
  2. Size of the QR code is too small, see e.g. https://github.com/corona-warn-app/cwa-documentation/issues/644#issuecomment-867820949 and https://github.com/corona-warn-app/cwa-documentation/issues/644#issuecomment-867845118 -> increase size
  3. The QR code should be placed on a white frame, see https://github.com/corona-warn-app/cwa-documentation/issues/644#issuecomment-868759882 . (This may be referred to as a margin in some QR code generators.) This might be root cause for https://github.com/corona-warn-app/cwa-app-android/issues/3514#issuecomment-867612726

This solution was already suggested by @vaubaehn in https://github.com/corona-warn-app/cwa-app-android/issues/3514#issuecomment-866948515

Original format EU_digital_vaccination_certificate original


Change to the following, moving the QR 2D code away from the edge of the paper to the center where it is less vulnerable to printing issues. Move the text "Scannen Sie den nebenstehenden ..." to the left of the QR code.

In addition, consideration should be given to increasing the size of the QR code to meet EU guidelines of 50mm to 60mm. The section listing name, date of birth and certificate ID uses up significant white space which could possibly be given up to the QR code.

EU_digital_vaccination_certificate modified

Additional information

https://ec.europa.eu/health/sites/default/files/ehealth/docs/covid-certificate_paper_guidelines_en.pdf eHealth Network Guidelines on Paper version of the EU Digital COVID Certificate, V1.0.2, 2021-05-26. says "The recommended size of the QR code has been set between 50 and 60 mm."


Internal Tracking ID: EXPOSUREAPP-8088

thinkberg commented 3 years ago

I wonder if the fix is actually a fix. If it is moved to the right it will still be at the edge of the paper after folding.

Ein-Tim commented 3 years ago

@thinkberg

The problem is not that it's at the edge after folding, but that it's on the edge for printing. If the QR-Code is placed in the middle of the paper, it's less likely that a side of the QR-Code gets cut off because the print area ended.

thinkberg commented 3 years ago

Ah okay, will check that.

MikeMcC399 commented 3 years ago

@thinkberg If there is somehow a problem with a fold interfering with the QR code, a user can unfold the certificate. If the QR code on the other hand has gone off the side of the paper because it is close to the edge, the user can only go back to the certificate issuer and request a replacement.

dsarkar commented 3 years ago

@MikeMcC399 Thanks.


Corona-Warn-App Open Source Team Internal Tracking ID: EXPOSUREAPP-8088

dsarkar commented 3 years ago

@MikeMcC399 Current specs allow 60 mm x 60 mm for the QR code. Do you want to add this to your suggestion?

MikeMcC399 commented 3 years ago

@dsarkar

Current specs allow 60 mm x 60 mm for the QR code

Could you please provide a reference source for that spec?

Can you also point to a spec or written definition of the German EU Digital Covid Vaccination Certificate? (I don't mean the image https://github.com/corona-warn-app/cwa-website/blob/master/src/assets/img/faq/EU_digital_vaccination_certificate.jpg since it doesn't explicitly define any dimensions.)

Do you think that increasing the size of the QR code would improve the reliability of reading it?

On the European Commission's page eHealth : Digital health and care page there is a document listed Template: paper version of the EU Digital COVID Certificate V1.0.2, 2021-05-26. This guideline says "The recommended size of the QR code has been set between 50 and 60 mm." It seems in practice that the German EU Digital Covid Vaccination Certificate is not following this guideline.

dsarkar commented 3 years ago

@MikeMcC399

eHealth Network Guidelines on Paper version of the EU Digital COVID Certificate

https://ec.europa.eu/health/sites/default/files/ehealth/docs/covid-certificate_paper_guidelines_en.pdf

Since resolution is limited and it is quite a dense QR code, it might improve ability to be scanned. We had cases where increasing contrast for example made an unreadable QR code readable.

EDIT: @MikeMcC399 Sorry, you found it already...

MikeMcC399 commented 3 years ago

@dsarkar Thanks for confirming your information source was the same one that I was using.

I have added a recommendation to the original post to consider conforming to the EU guidelines. Space could be saved in the area below the QR code to allow more space for the QR code. For instance the date of birth uses three lines and has a lot of white space before and after it. The whole text in German and English would fit on one line and the white space before and after could be shrunk.

dsarkar commented 3 years ago

@MikeMcC399 Added to internal ticket.

vaubaehn commented 3 years ago

@thinkberg I experimented a little and found further issues: When you receive generated PDF from back-end and print it, it also depends on the browser's PDF plugin how will be the result, i.e. Microsoft Edge automatically shrinks it to 96% size with default settings here. Printed with 96% results in a small QR code (41mm x 41mm) that was very hard to be scanned with any app. If you manually set document size to 100%, QR code is 43mm x 43mm here, much more easy to scan, but then the left edge of the QR code is at risk to be cut off.

Edit: Would be good if QR code can be scanned successfully without the user needing to alter default settings of most browsers. This can most likely be achieved by changing the layout in different ways that have already been suggested here.

MikeMcC399 commented 3 years ago

@vaubaehn I downloaded an EU Digital Covid Vaccination Certificate today from https://impfzentren.bayern/citizen The certificate was created by "Apache FOP Version 2.6: PDF Transcoder for Batik" and has page size 20.988 x 29.700 cm (properties viewed with Adobe Acrobat Reader DC (21.005.20048)).

I printed it out from Adobe Acrobat Reader DC with the settings "Actual size" and there was only a 6mm margin from the edge of the QR code to the edge of the paper. (This is less than the EU recommendation of 1cm margin.) The QR code measured 45mm x 45mm.

Selecting "Fit" or "Shrink oversized pages" on a HP printer, with "Borderless off" selected, scaled the page down using 97% (similar to your 96%). With "Borderless on" selected there was no shrinking.

I agree that it would be good to use a format which prints well (in preparation for scanning) using common printer setups like you and I have described.

MikeMcC399 commented 3 years ago

@thinkberg Is there some place to make other suggestions for the PDF form of the "EU digital Covid Vaccination Certificate"?

thinkberg commented 3 years ago

I will take these suggest, thanks a lot. Part of it is a case of not seeing the wood for the trees.

dsarkar commented 3 years ago

@MikeMcC399 I have added a short summary of the suggestions in your OP, in the possible fix section. I hope you don't mind. Feel free to edit it further.

dsarkar commented 3 years ago

Hi @thinkberg,

As far as I see here, the community identified three possible areas of improvement for the DCC document. Is there already a preview and maybe even a timeline you could share here with the community?

Thanks, DS


Corona-Warn-App Open Source Team CC @GisoSchroederSAP CC @thomasaugsten

MikeMcC399 commented 3 years ago

@dsarkar

I have added a short summary of the suggestions in your OP, in the possible fix section. I hope you don't mind. Feel free to edit it further.

Thanks for your collation of the suggestions!

I made an edit to note that what I had called a white frame is often simply called a "margin" surrounding the QR code. It is certainly part of the (now deprecated) Google QR code generator. The reimplementation on https://zxing.org/ is documented on https://github.com/zxing/zxing/wiki/Chart-Server-Parameters. This defaults to a margin of 4 and doesn't accept a margin less than 1.

MikeMcC399 commented 3 years ago

@thinkberg

I will take these suggest, thanks a lot. Part of it is a case of not seeing the wood for the trees.

Do you have any feedback about the suggestion to change the layout of the printed vaccination certificate?

thinkberg commented 3 years ago

We made changes to fix these issues: https://github.com/Digitaler-Impfnachweis/certification-apis/tree/master/templates

MikeMcC399 commented 3 years ago

@thinkberg

We made changes to fix these issues: https://github.com/Digitaler-Impfnachweis/certification-apis/tree/master/templates

Thank you very much for the information and for the changes!

I will close this issue and suggest that any follow-up goes through https://github.com/Digitaler-Impfnachweis/certification-apis/discussions (or https://github.com/Digitaler-Impfnachweis/certification-apis/issues in the case of bugs).