hello friend saw some topics their on the internet and would like a help from you, I'm trying to collect the total pages printed, for example a file from a page to print two copies, the total is 2, use the following form but does not bring the value correct. I appreciate any clarification
Code:
string searchQuery = "SELECT * FROM Win32_PrintJob";
ManagementObjectSearcher searchPrintJobs = new ManagementObjectSearcher(searchQuery);
ManagementObjectCollection prntJobCollection = null;
prntJobCollection = searchPrintJobs.Get();
foreach (ManagementObject prntJob in prntJobCollection)
{
jobs.PagesPrinted = prntJob.Properties["PagesPrinted"].Value.ToString();
jobs.TotalPages = prntJob.Properties["TotalPages"].Value.ToString();
}
Comment