Ram Singh
Ram Singh

Reputation: 6938

How to set default printer in asp.net?

I want to set a default printer to print the docs from my web application. I don't know how to set it. As all the users using this application should have a specific printter accttached to their PC. Please help me. Thanks in advance.

Upvotes: 2

Views: 2582

Answers (1)

dknaack
dknaack

Reputation: 60556

Description

You can't set the default printer of a user who visits your site.

If you want to set your own default printer programmatically you can use the following function.

[DllImport("winspool.drv", CharSet=CharSet.Auto, SetLastError=true)]
public static extern bool SetDefaultPrinter(string Name);

More Information

Upvotes: 1

Related Questions