I need to send documents to a network printer (myservermyprinter). I'm using the System.Printing classes to print, and it works fine when it's from a Windows Service, but from an ASP.NET app, it's only able to print to local printers, not network printers. The error I'm getting is "Printer Name is not valid" This is what I'm using to get the printer name:
public string PrinterName
{
using (LocalPrintServer server = new LocalPrintServer())
return server.GetPrintQueue(@"\myservermyprinter");
}
What are my options here? Is this a permissions problem?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…