I can open the print page with the following code but I want the print directly to the printer without displaying the Print Dialog. And I need directly 2 pages printing.
printDiv() {
$(document).ready(() => {
var win = window.open();
var prtn = document.getElementById("divYazdir").innerHTML;
win.document.open();
win.document.write('<' + 'html' + '><head></head>' + '<' + 'body' + '>');
win.document.head.innerHTML = document.head.innerHTML;
win.document.body.innerHTML = prtn
win.document.write('<' + '/body' + '><' + '/html' + '>');
win.document.close();
win.print();
win.close();
});
}