PrintDocument.PrinterSettings.PrinterName \\servername\printername Not Available

13,744

If you installed the printer as a local tcp/ip printer (like this) then you should be able to call the printer whatever you want and use this printer name. I would recommend doing it this way.

If it's a shared network printer that is attached to the PC via USB, serial or parallel port then this is where you would need to share it and access it via \servername\printername. Please also keep in mind that the printer has to be installed on the computer you intend to use it. Just because it's a shared printer doesn't mean you can use it via \servername\printername without first installing it.

Share:
13,744

Related videos on Youtube

Aaron
Author by

Aaron

I'm a software developer for an independent grocer. I develop using C# in both Windows Applications and Web Applications. I also develop using pure ASP.

Updated on June 04, 2022

Comments

  • Aaron
    Aaron almost 2 years

    I'm using the C# System.Drawing.Printing namespace. I need to send a document to a network printer; however, all of our network printers are named like this:

    r99p-printername.company.com

    Setting the printer name of my PrintDocument object, according to the MSDN documentation, I need to use \\servername\printername. My network admin assures me that none of the printers have this, and I can only use the above-mentioned naming convention for network printers. When I try using this in my app, I get a "Settings to access printer not valid".

    Any ideas?

    Thanks.

  • Aaron
    Aaron almost 13 years
    Exactly what I ended up doing. I installed the printer as a local printer on the web server, which gave my applications that run on the web server the ability to use it, but it doesn't give users the option to print to that printer directly from desktop applications (important for my case).

Related