execCommand Print Options Not Working
-
Wednesday, June 20, 2012 2:08 PM
I'm trying to use Javascript to print directly to a printer. The particulars:
- IE 9.0
- Javascript
- Printing via execCommand('print',false,null) command
I still get the print dialog box even though the second argument is false. How can I programmatically send a web page to a printer without the dialog? Lots of google searches so far. Many of the solutions use ExecWB but that's out because the second Option (the one that supresses the print dialog box) has been broken since IE7 (http://social.msdn.microsoft.com/Forums/en-US/ieextensiondevelopment/thread/21d2bc41-d182-4af6-81e9-6e06793058b9). I'm trying to avoid ActiveX too.
I've tried SendKeys as well and it gets the PrintDialog box and stops. I can't send the ENTER keystroke to close the box.
DJ Baby Anne's Biggest Fan................
- Edited by Abercrombie07 Wednesday, June 20, 2012 2:12 PM
All Replies
-
Thursday, June 21, 2012 8:23 AMModerator
Hi, you can try “window.print()”, please refer to the example on the following link:
-
Thursday, June 21, 2012 1:42 PM
No disrespect but..... the requirement was that it print without the print dialog box. Window.print() does not work. Per the link you sent:
, is that it does not immediately fire a print. It actually only fires the print window, which still gives your site's visitors a choice in the matter!"
I do not want to give the user an option. It's a Point of Sale system that the user will consider as another type of POS if I don't get this working.. (Pun intended).
DJ Baby Anne's Biggest Fan................
-
Sunday, June 24, 2012 12:27 AMBump.. Any more possibilities?
-
Thursday, July 12, 2012 2:17 PMBump.. Any more ideas?
DJ Baby Anne's Biggest Fan................


