locked
How to get number of printed pages RRS feed

  • Question

  • Hello!

    I need to count total number of pages printed at selected printer.

    This time I make it as following: I periodicaly scan printer queue and get pages in jobs. There is no problem if job print in single copy.

    However, if document print in few copies, I get number of pages in one copy, not all copies. How can I get number of copies, or total number of pages in all copies?

    Please, help!
    Monday, November 17, 2008 6:17 AM

Answers

  • This looks like a Windows API restriction to me.  Neither JOB_INFO_1 nor JOB_INFO_2 contains a member that indicates the number of copies.  The printer itself it told to produce the requested number of copies through the printer driver.  I don't see a way to get to that info unless the printing got started on the machine that's monitoring the queue (PrinterSettings.Copies).  I would assume that's not the case.  Ouch.
    Hans Passant.
    • Marked as answer by Zhi-Xin Ye Friday, November 21, 2008 1:35 PM
    Tuesday, November 18, 2008 3:43 AM

All replies

  • What BCL class do you use to do this?
    Hans Passant.
    Monday, November 17, 2008 12:08 PM
  •  System.Printing.PrintSystemJobInfo

    There are another classes which help me to get pages number?
    Monday, November 17, 2008 10:18 PM
  • This looks like a Windows API restriction to me.  Neither JOB_INFO_1 nor JOB_INFO_2 contains a member that indicates the number of copies.  The printer itself it told to produce the requested number of copies through the printer driver.  I don't see a way to get to that info unless the printing got started on the machine that's monitoring the queue (PrinterSettings.Copies).  I would assume that's not the case.  Ouch.
    Hans Passant.
    • Marked as answer by Zhi-Xin Ye Friday, November 21, 2008 1:35 PM
    Tuesday, November 18, 2008 3:43 AM
  • hm....

    Thanks...
    Wednesday, November 19, 2008 8:26 AM