angular-qrcode icon indicating copy to clipboard operation
angular-qrcode copied to clipboard

How to print on a device

Open Ross-Rawlins opened this issue 7 years ago • 1 comments

I am trying to print the qr code in the HTML I pass to a print plugin. But the QR code is not showing. How can I create a temp file to pass the path of to the printer? Or even better yet how can I get the DATA URI that is generated and use it in my component.

Ross-Rawlins avatar Jul 11 '17 11:07 Ross-Rawlins

@Ross-Rawlins This is due to rendering canvas in print window. As a workaround, I have disabled canvas and used image by adding the below code in angular-qrcode.js after line number 39 canvas2D = (print in attrs)? false :true; Then in the directive add this <qrcode data="string" print></qrcode>

excitepv avatar Nov 01 '18 04:11 excitepv