开发者

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

I'm using the C# System.Drawing.Printing namespace. I开发者_JAVA百科 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜