cwa-app-android
cwa-app-android copied to clipboard
Extra whitespace in EU printout
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
Steps to reproduce the issue
On Desktop
- Use Android Studio Device File Explorer to transfer vaccination certificate PDF to the emulator
In CWA App
- Tap Scan
- Tap Open File
- Navigate to vaccination certificate in File app and tap on file, tap "Continue"
- Tap three-dot symbol
- Select Display Print Version, tap "Next"
- Tap Printer symbol
- Select printer "Save as PDF", tap "SAVE"
- Open "Files" app
- Navigate to previously saved PDF and tap to open
- Use Ctrl and mouse key to zoom to information section
- 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
@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 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.
The problem does not occur in CWA 2.23.2, see screenshot
@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.
@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 Many thanks for analysis, will forward to internal ticket your findings.
- PR https://github.com/corona-warn-app/cwa-app-android/pull/5420 is addressing this issue.
Fixed in v2.26.0-rc.1.