Printing to non default printer from ASP.NET Page [modified]
-
I am trying to print to a receipt printer during our payment process. The printer is not the default printer and I can't change that. The problem is that from the browser you don't have permission to programatically get a list of printers and select which one you want. So, currently we pop up the Print dialog then select the desired printer and then click ok. This is two steps too many. How can you get around this limitation and automate the printing of the receipt?
modified on Friday, June 6, 2008 11:29 AM
-
I am trying to print to a receipt printer during our payment process. The printer is not the default printer and I can't change that. The problem is that from the browser you don't have permission to programatically get a list of printers and select which one you want. So, currently we pop up the Print dialog then select the desired printer and then click ok. This is two steps too many. How can you get around this limitation and automate the printing of the receipt?
modified on Friday, June 6, 2008 11:29 AM
No, you cannot. As you said, in javascript, you can kick off the printing process, but you can't interact with it.
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
I am trying to print to a receipt printer during our payment process. The printer is not the default printer and I can't change that. The problem is that from the browser you don't have permission to programatically get a list of printers and select which one you want. So, currently we pop up the Print dialog then select the desired printer and then click ok. This is two steps too many. How can you get around this limitation and automate the printing of the receipt?
modified on Friday, June 6, 2008 11:29 AM
The default JavaScript does not have the privileges of choosing a printer. You may need an ActiveX Solution to do that. Check out ScriptX, the basic version of which is free. I also have a small review of the same over here: http://www.dotnetspider.com/resources/3147-Software-Review-Granular-Print-Control-wi-Inte.aspx[^]
Vasudevan Deepak Kumar Personal Homepage
Tech Gossips
All the world's a stage, And all the men and women merely players. They have their exits and their entrances; And one man in his time plays many parts... --William Shakespeare -
No, you cannot. As you said, in javascript, you can kick off the printing process, but you can't interact with it.
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
So, I guess we could create a client side windows web service which accepts the html and then have the web page post to it and then it could do the printing.
-
So, I guess we could create a client side windows web service which accepts the html and then have the web page post to it and then it could do the printing.
Well, a client side app that calls a web service, yes, that would work. Or an ActiveX control perhaps.
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
Well, a client side app that calls a web service, yes, that would work. Or an ActiveX control perhaps.
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
Yes, I didn't what to do an ActiveX control but either way it is a client side solution. thanks for your input.