I have this tiny code just to get things clear. I have a button to click on and it must trigger a printing event but without opening a print pop-up.
Can I actually do something like:
1.when a user clicks on this btnPrint
, a printer just starts printing without any pop-up window
2.and not print the current page but a document sent through some URL?
Thanks in advance!
JS:
$('.btnPrint').on('click', function () {
window.print();
});