En utilisant la nouvelle API d'impression .net (System.Printing.dll), comment obtenez-vous l'adresse IP d'une imprimante réseau?En utilisant la nouvelle API d'impression .net (System.Printing.dll), comment obtenez-vous l'adresse IP d'une imprimante réseau?
Les classes je regarde sont
- http://msdn.microsoft.com/en-us/library/system.printing.printqueue.aspx
- http://msdn.microsoft.com/en-us/library/system.printing.printserver.aspx
Voici quelques exemples de code
PrintServer printServer = new PrintServer(@"\\PrinterServerName");
foreach (PrintQueue queue in printServer.GetPrintQueues())
{
Debug.WriteLine(queue.Name);
Debug.WriteLine(queue.QueuePort.Name);
//how do i get the ipaddress of the printer attached to the queue?
}
Alors, est-il possible d'imprimer sur une imprimante réseau à partir d'ASP.NET? S'il vous plaît voir ma question à http://stackoverflow.com/questions/3729153/printing-from-asp-net-to-a-network-printer – Prabhu