I am creating a custom print job monitoring application in C# Win Forms, I am able to get most the print job information using PrintJobInfoColletion but I am not able to get number of copies here is my code so far:
PrintJobInfoCollection jobs = pq.GetPrintJobInfoCollection();
foreach (PrintSystemJobInfo job in jobs)
{
string[] row = new string[] { job.JobIdentifier.ToString(),
pq.Name,
job.Name,
job.JobStatus.ToString(),
job.Submitter,
job.NumberOfPages.ToString(),
((job.JobSize / 1024f) / 1024f).ToString("N2") + " MB",
job.TimeJobSubmitted.ToLocalTime().ToString() };
dataGridView1.Rows.Add(row);
}
While I tried this code to get a number of copies which is always returning me 1
var copies = job.HostingPrintQueue.CurrentJobSettings.CurrentPrintTicket.CopyCount;
I have been trying over for a week now and still can not find solutions for my problem, my aim is to get a total number of pages printed in a particular job. PrintJob.NumberOfPagesPrinted is also returning zero.