Angular Printing Funtionality

84 views Asked by At

I Want to implement print functionality in the angular web application, I have to print a barcode and some text so I have created the barcode. now I need to print the html div print as a label. So I want to use automatic printing functionality and Multiple label printing.

var divToPrint = document.getElementById('printBody');
var newWin = window.open('', 'Print-Window', 'width=1000 ,height=600');
newWin?.document.open();
newWin?.document.write("here inner html")

But it's opening the div as pdf, and open a chrome print window.. Does anybody have any suggestions to do an auto print of one or multiple images in the default printer and the div image should fit in the label?

I want some suggestions or else give me an example codes

0

There are 0 answers