soldair / node-qrcode

qr code generator
MIT License
7.46k stars 621 forks source link

window.print() renders QR code svg as black square in print preview. firefox only #338

Open sssiegmeister opened 1 year ago

sssiegmeister commented 1 year ago

My angular application uses window.print() on a page which contains a QR code generated with this library. On firefox, the print preview transposes a black square over the QR code, which is in svg format. It appears the black square can be removed by using the dev console to remove the "fill" attribute from the first element which is a child of the element which is the QR code (this is why I say the black square an overlay, not replacing the QR code).

Not sure if this is a known issue using this package in firefox, but if so, is there maybe a configuration step that was missed? Thanks

sssiegmeister commented 1 year ago

Including link to a stackblitz which can demonstrate the issue, as well as screenshots

https://stackblitz.com/edit/angular-qrcodefirefoxprint

page print

ArmanBhatia0100 commented 3 weeks ago

You need to check this option of "print background" in the firefox print setting.

image

@sssiegmeister