I am developping an intranet for a shop. I need to print a receipt by clicking a submit button on php page. I do not want to see Windows print dialog box.
how can I do this. I need some advise
I will use Windows XP, I have full control of the system which this application will be running, Any application/plugin/exploits etc can be installed or used to help with removing the print dialog box.
Regards
Simply assign the desired printer as the default printer in Windows and make sure you're using the Chrome Engine under the browser settings (the default setting). Then call window. print(); and that's it!
You just need to call Print() itself, instead of window. print() in the onclick event.
I do this with my shop order system written in PHP and it uses a print dialog via jquery. you can bypass the firefox print dialog by using the about:config page.
That's it, you will no longer see the dialog box when you print. Beware though, it will try to print to the last printer you used when you had the dialog box open. If you ever need to change it then you will need to toggle the value for print.always_print_silent by following the above steps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With