1

I am trying to make a printing manangement server. I have 1 printer which is shared with 4 other people.

try
{
    string PrinterJobs = "SELECT * FROM Win32_PrintJob";
    ManagementObjectSearcher FindPrintJobs =
              new ManagementObjectSearcher(PrinterJobs);
    ManagementObjectCollection prntJobCollection = FindPrintJobs.Get();
    foreach (ManagementObject prntJob in prntJobCollection)
    {
        string jobName = prntJob.Properties["Name"].Value.ToString();
        string documentName = prntJob.Properties["Document"].Value.ToString();
      string nbcopie = prntJob.Properties["TotalPages"].Value.ToString();
    }
}
catch (Exception ex)
{
    MessageBox.Show(ex.Message);
}

But i need to get number of copies of each printjob( eg user2 make 3copy of the same print job)

I need to see copy count before printing. please help me

Junaid
  • 1,004
  • 8
  • 24
D'Ums
  • 13
  • 4
  • Possible guidance [here](http://stackoverflow.com/questions/7256737/get-the-total-amount-of-pages-from-win32-printjob). – DonBoitnott May 21 '15 at 11:25
  • http://stackoverflow.com/questions/8082445/setjob-method-always-returns-122 get Interop methods from this link. After this get JOB_INFO_2.DEVMODE.dmCopies – slava May 21 '15 at 12:12
  • its only exist in C++? – D'Ums May 23 '15 at 14:49
  • guys please formulate an answer or mark as duplicate. This question is used as another reference for duplicate, and still doesn't have an answer provided/ accepted – Ziezi Sep 24 '15 at 13:51

0 Answers0