2

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.

Ram Singh
  • 6,664
  • 35
  • 100
  • 166

1 Answers1

1

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

dknaack
  • 60,192
  • 27
  • 155
  • 202
  • Sir if i know that the all users using my app. have a specific printer installed in their PC then can we go for it??? – Ram Singh Jan 11 '12 at 10:11
  • What is **your App** ? If it is a WebApplication it is not possible. – dknaack Jan 11 '12 at 10:12
  • Than it is not possible. There is no standard defined to get access to the system by an web application. So my anwers is right. – dknaack Jan 11 '12 at 10:21