cwa-app-android icon indicating copy to clipboard operation
cwa-app-android copied to clipboard

Extra whitespace in EU printout

Open MikeMcC399 opened this issue 2 years ago • 8 comments

Avoid duplicates

  • [X] Bug is not mentioned in the FAQ
  • [X] Bug is specific for Android only, for general issues / questions that apply to iOS and Android please raise them in the documentation repository
  • [ ] Bug is not already reported in another issue Refer also to https://github.com/corona-warn-app/cwa-app-android/issues/5350, which is marked with label https://github.com/corona-warn-app/cwa-app-android/labels/Fix%202%2E25.

Technical details

  • Device name: Pixel 3a emulator
  • Android version: 12
  • App version: pre-release 2.25.x - 2.25.0-RC1 in addition to previously reported 2.24.2. Regression from CWA 2.23.2.

Describe the bug

The EU printout contains extraneous whitespace:

  • between the introductory words of each paragraph and the following text
  • between the first part of a hyphenated word and the hyphen
  • after the link https://reopen.europa.de before the full-stop

CWA 2 25 x export cert

Steps to reproduce the issue

On Desktop

  1. Use Android Studio Device File Explorer to transfer vaccination certificate PDF to the emulator

In CWA App

  1. Tap Scan
  2. Tap Open File
  3. Navigate to vaccination certificate in File app and tap on file, tap "Continue"
  4. Tap three-dot symbol
  5. Select Display Print Version, tap "Next"
  6. Tap Printer symbol
  7. Select printer "Save as PDF", tap "SAVE"
  8. Open "Files" app
  9. Navigate to previously saved PDF and tap to open
  10. Use Ctrl and mouse key to zoom to information section
  11. Rotate right twice using emulator controls (for convenience in reading)

Note the gaps in the text as shown in the marked-up screenshot.

Expected behavior

An exported certificate should not contain unsightly whitespace in the information section.

Possible Fix

Review creation of exported certificate from template.

Additional context

  • The template de_vc_v4.1.svg viewed on its own in Google Chrome shows no whitespace gaps.

  • Since the template places the text using absolute coordinates, there may be a scaling issue involved.

  • This problem has also been reported for the CovPass App in https://github.com/Digitaler-Impfnachweis/covpass-android/issues/222.


Internal Tracking ID: EXPOSUREAPP-13635

MikeMcC399 avatar Jul 18 '22 12:07 MikeMcC399

@dsarkar

You have added the https://github.com/corona-warn-app/cwa-app-android/labels/Fix%202%2E26 label, which is encouraging! Do you also have a PR reference which provides the fix?

MikeMcC399 avatar Jul 18 '22 13:07 MikeMcC399

@MikeMcC399 Planned fix, no PR yet. Anyway, my understanding is that the template needs the fix, not the app, in contrast to the scaling issue, which needs to be fixed in the app.

dsarkar avatar Jul 18 '22 13:07 dsarkar

The problem does not occur in CWA 2.23.2, see screenshot

image

MikeMcC399 avatar Jul 18 '22 14:07 MikeMcC399

@dsarkar

Planned fix, no PR yet.

Thank you!

my understanding is that the template needs the fix, not the app, in contrast to the scaling issue, which needs to be fixed in the app.

There was some discussion with @thomasaugsten about where the issue comes from. I pointed out that it is a regression from CWA 2.23.2 and that the template hadn't changed for about one year. I don't however have a deeper insight into how the PDF is built, so I have to leave the further troubleshooting and fix up to the development experts.

MikeMcC399 avatar Jul 18 '22 14:07 MikeMcC399

@dsarkar

  • After looking at PR https://github.com/corona-warn-app/cwa-app-android/pull/5271 I realised that CWA Android changed the templates used for exporting certificates starting with 2.24.0

Previously the templates were based on PDF format files. With 2.24.0 CWA started using the SVG format files.

For instance for vaccination certificates in 2.23 Corona-Warn-App/src/main/assets/vaccination_certificate_template.pdf

then in 2.24 Corona-Warn-App/src/main/assets/template/de_vc_v4.1.svg

At least this information explains the regression from 2.23 to 2.24. I can't say what the fix would be though.

MikeMcC399 avatar Jul 20 '22 08:07 MikeMcC399

@MikeMcC399 Many thanks for analysis, will forward to internal ticket your findings.

dsarkar avatar Jul 20 '22 09:07 dsarkar

  • PR https://github.com/corona-warn-app/cwa-app-android/pull/5420 is addressing this issue.

MikeMcC399 avatar Aug 04 '22 18:08 MikeMcC399

Fixed in v2.26.0-rc.1.

MikeMcC399 avatar Aug 05 '22 13:08 MikeMcC399