Skip to content

LG-7180: Fix printed appearance of Barcode#6732

Merged
aduth merged 1 commit intomainfrom
aduth-lg-7180-barcode-print
Aug 15, 2022
Merged

LG-7180: Fix printed appearance of Barcode#6732
aduth merged 1 commit intomainfrom
aduth-lg-7180-barcode-print

Conversation

@aduth
Copy link
Contributor

@aduth aduth commented Aug 12, 2022

Why: Since apparently table cell background colors are made transparent in default printing behavior, whereas cell border coloring is not.

Testing instructions:

  1. Go to http://localhost:3000
  2. Sign in
  3. Go to http://localhost:3000/verify
  4. Complete proofing flow up to document capture
  5. Use attention result test YAML document
  6. Click "Verify your ID in person"
  7. Complete in-person proofing flow
  8. Observe barcode is visible on "You're ready to verify" screen
  9. Print the barcode
  10. Observe barcode is visible and accurate

Screenshots:

Browser content (visually unchanged):

Before After
Screen Shot 2022-08-12 at 10 17 36 AM Screen Shot 2022-08-12 at 10 17 38 AM

Printed content:

Before After
Screen Shot 2022-08-12 at 10 17 14 AM Screen Shot 2022-08-12 at 10 17 25 AM

(the appearance in the preview seems to be affected by scaling)

**Why**: Since apparently table cell background colors are made transparent in default printing behavior, whereas cell border coloring is not.

changelog: Upcoming Features, In-person proofing, Fix barcode appearing as invisible when printed
@zachmargolis
Copy link
Contributor

What about using SVG output from the barby gem?

@aduth
Copy link
Contributor Author

aduth commented Aug 12, 2022

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 #6580 (comment)).

We could consider switching how we render the barcode based on the context, but I was hoping to avoid maintaining support for multiple implementations.

@zachmargolis
Copy link
Contributor

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

Copy link
Contributor

@tomas-nava tomas-nava left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approve!

I compared the before & after barcodes to each other; they look identical. I checked the web & email barcodes in this online barcode reader and they read correctly. I even printed a paper copy of the barcode, took a picture with my phone, and uploaded that to the barcode reader, and it read correctly.

@aduth aduth merged commit e174eb1 into main Aug 15, 2022
@aduth aduth deleted the aduth-lg-7180-barcode-print branch August 15, 2022 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants