auto print tanpa konfirmasi biasanya dibutuhkan untuk aplikasi kasir yang berbasis web,
jadi kasir bisa lebih cepat melayani customernya 👍
Langsung saja, caranya gampang banget
tambahkan javascript berikut di aplikasi web kita
window.print();
atau
window.onload=function(){self.print();}
FIREFOX
In the address bar of Firefox, type about:config
Search for
print.always_print_silent
and double click itChange it from false to true
CHROME
Check this and follow the steps:
- Launch Chrome and check that the Chrome Version is at the latest version (18.0.1 or higher )
- Type about:flags in the address bar and ensure that the Disable Print Preview flag is NOT enabled (Print preview must be enabled for Kiosk Printing to work)
- Close the browser
- Find the browser shortcut on your desk top, right click and select 'properties'
- Append the following text to the end of the target field: -kiosk-printing atau -kiosk -kiosk-printing (It should now load in full screen (kiosk) mode)
- Save, and launch Google Chrome.
- The print preview will appear on your screen, but will instantly print a receipt to your default printer.
Semoga bermanfaat
Referensi:
https://stackoverflow.com/questions/9213660/html-javascript-one-click-print-no-dialogs
https://windowsreport.com/chrome-system-print-dialog/
https://stackoverflow.com/questions/21073959/print-without-confirmation-on-google-chrome
terimakasih, sangat membantu
BalasHapus