html print to two/more printer
I have developed a Restaurant Order Punching software that prints Kitchen Order Ticket (KOT) & Bar Order Ticket (BOT) in one html page in two parts. But in one print click KOT part should go to kitchen printer & BOT part should go to bar printer. Printer can be more than two if some items are available at some other counters like ice cream etc. I can do it by using CSS & 'two/three/no_of_sections' but customer needs it in one click开发者_JAVA技巧. I am stuck please help.
Bilal
It is not possible to do this with JavaScript in just one click. For security reasons, JS is sandboxed - in this particular case, that means that JS can only be used to bring up the browser's Print
window, and that's it.
Further reference: window.print()
@ MDC.
You could, however, set up a print proxy like Google Cloud Print.
You can't automate this using Javascript. Why?
Which print dialog box displays when someone presses the print button in their browser or the Javascript window.print() method runs depends on the operating system and what printers are installed on the computer.
Good explanation here.
Note: Please don't ask "if I know the OS and what printers installed, can I do it?" ;-)
精彩评论