<div class='econtractVMT' id="econtractVMT" *ngIf="qrCodeFlag"> <p class="text-left…
- User
<div class="text-center"> <button (click)="printQR()" class="printBtn btn btn-vfColor btn-stretch">Print QR</button> </div> </div> and printQR(){ let win; if (navigator.userAgent.search("MSIE") !== -1) { win = window.open('', '', 'width=300,height=400'); } else { win = window.open(); } // win.document.write('<html><head><title>E-Sim QR Code!</title><style>\n' + // 'body {\n' + // ' padding: 10px;\n' + // '}\n' + // 'p { margin:3px 0 0 !important;font-size:14px }\n' + // '@media print {\n' + // ' @page { margin: 0; }\n' + // ' body { margin: 0 10px; }\n' + // '}</style></head><body>'); win.document.write(document.getElementById("econtractVMT").innerHTML); win.document.write('</body></html>'); win.document.close(); win.focus(); win.print(); if (navigator.userAgent.search("MSIE") === -1) { win.close(); }} why barcode appear in print window and qrcode not appear - Assistant
- User
recommend the css styles that help to show qrcode
- Assistant
To ensure that a QR code appears correctly when printed, you can apply specific CSS styles both for display on the screen and to control the printed output. Below are some recommended styles you can incorporate into your existing stylesheets, ideally under a rule.
- User
hwa acheive using ChangeDetectorRef
- Assistant
- User
i used the solution of html2canvas and worked well, but now i want to display button none in print view i used @media print and didn't work
- Assistant