Rudy
Rudy

Reputation: 1

How can I select a different printer in a web application?

I have a Web application programmed in C#.

There are several printers and I want to choose any of them and execute the action, I would like some kind of Form to load all printers.

I found this for Win forms:

this.printDialog1.Document = this.printDocument1;

DialogResult dr =  this.printDialog1.ShowDialog();

But I couldn't find something for ASP.NET.

Thanks for any help.

Upvotes: 0

Views: 2043

Answers (2)

Duncan
Duncan

Reputation: 442

You really can't do it from a web app, if it was allowed then pop-up loving sites all over the internet would I'm sure be accounting for most of the worlds ink usage.

I had this issue when building a web app for a college, the most its possible to do is call up the print dialogue and have the user select the printer (best to have a decent print targeted CSS here):

javascript:window.print();

Its not perfect but to be honest although they insisted on it when it was put in a year ago, emails and PDF's are much more widely used.

Upvotes: 1

IrishChieftain
IrishChieftain

Reputation: 15253

The printer is assigned at the workstation.

Upvotes: 0

Related Questions