Abdalla Omran

Abdalla Omran

  • 1.8k
  • 330
  • 16.7k

How could get User and Number of Pages from PrintServer ?

Oct 21 2021 3:14 PM

Hi All,

I am using PrintServer to read all PrintQueues on my Printer Server(which is running on my Windows Server) and I want to know which user has sent request to printer and how many pages has he printed .from my code i am just getting the name of Printers and their proprties like HasPaperProblem or IsOffilne and ...etc 

What I want to achive is :

1 - Get User that used the Printer every Time ? 

2- How many page has he printed ? 


I thank you always in advanced. 

 PrintServer myPrintServer = new PrintServer(@"\\serverName");
            PrintQueueCollection myPrintQueues = myPrintServer.GetPrintQueues();

            var printQueueNames = "My Print Queues:\n\n";

            foreach (PrintQueue item in myPrintQueues)
                printQueueNames += "\t" + item.Name + "\n";
                var hasProblem = item.HasPaperProblem;
                var isOffline = item.IsOffline;


Answers (1)