1

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();
});
Anant Kumar Singh
  • 68,309
  • 10
  • 50
  • 94
CodePuppe
  • 109
  • 1
  • 8
  • 2
    `1.when a user clicks on this btnPrint, a printer just starts printing without any pop-up window` No, that's not possible. `2.and not print the current page but a document sent through some URL?` And neither is that – Rory McCrossan Jul 11 '17 at 10:43
  • https://stackoverflow.com/a/1124848/4248328 – Anant Kumar Singh Jul 11 '17 at 10:44

1 Answers1

0

kiosk-printing This is work with chrome and opera

added any of these shortcut to the desktop Chrome "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --kiosk-printing https://YOURDOMAIN Opera "C:\Program Files\Opera\launcher.exe --kiosk --kiosk-printing https://YOURDOMAIN