I have issue in print receipt with image in for loop when i am using below code it doesn't load image when multiple print using for loop (It is working fine single print) but i have remove image reference it is work fine. So, Please give me solution.
function printReceipt() {
for (var index = 0; index < 10; index++) {
var imageData = '<img src="./images/image.png"/>';
var newWin = window.open('', 'Print-Window');
newWin.document.open();
newWin.document.write('<html><title>WEB</title><body onload="window.print()">' + imageData + '</body></html>');
newWin.document.close();
setTimeout(function () {
newWin.close();
}, 200);
}
}
printReceipt();