identity-idp
identity-idp copied to clipboard
LG-7180: Fix printed appearance of Barcode
Why: Since apparently table cell background colors are made transparent in default printing behavior, whereas cell border coloring is not.
Testing instructions:
- Go to http://localhost:3000
- Sign in
- Go to http://localhost:3000/verify
- Complete proofing flow up to document capture
- Use attention result test YAML document
- Click "Verify your ID in person"
- Complete in-person proofing flow
- Observe barcode is visible on "You're ready to verify" screen
- Print the barcode
- Observe barcode is visible and accurate
Screenshots:
Browser content (visually unchanged):
Before | After |
---|---|
![]() |
![]() |
Printed content:
Before | After |
---|---|
![]() |
![]() |
(the appearance in the preview seems to be affected by scaling)
What about using SVG output from the barby gem?
What about using SVG output from the barby gem?
We previously used the PNG printer, but switched to the table printer when using it also in email templates since neither data URI images nor embedded SVG have good support in email clients (more context at https://github.com/18F/identity-idp/pull/6580#discussion_r921157807).
We could consider switching how we render the barcode based on the context, but I was hoping to avoid maintaining support for multiple implementations.
We could consider switching how we render the barcode based on the context, but I was hoping to avoid maintaining support for multiple implementations.
that seems reasonable, esp if we have to maintain the CSS styles for the emailed ones anyways