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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With