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;
}
Srinivasan RamamoorthiPosted Oct 21, 2021, 3:48 PM
You have to instantiate PrintSystemJobInfo class and access Submitter property and Number of Pages property.
public class PrintSystemJobInfo : System.Printing.PrintSystemObject
Refer this article for further reference
https://docs.microsoft.com/en-us/dotnet/api/system.printing.printsystemjobinfo?view=windowsdesktop-5.0