Monday, September 30, 2013

how to connect remote printer in asp.net

If you want to list all printers in a print server:



PrintServer myPrintServer = new PrintServer(@"\\ServerName", System.Printing.PrintSystemDesiredAccess.EnumerateServer);

// List the print server's queues
PrintQueueCollection myPrintQueues = myPrintServer.GetPrintQueues();
String printQueueNames = "My Print Queues:\n\n";
foreach (PrintQueue pq in myPrintQueues)
{
printQueueNames += "\t" + pq.Name + "\n";
}

MessageBox.Show(printQueueNames);





Please remember to 'Mark as Answer' the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


No comments:

Post a Comment