title: Get the total pages from print job
body: <p>I was downlaod this code from <a href="http://www.codeproject.com/Articles/51085/Monitor-jobs-in-a-printer-queue-NET" rel="nofollow">Monitor jobs in a printer queue (.NET)</a>
  And now I want to know the total pages from the print job.
  I saw the Comments and add this code:</p>
  
  <pre><code>if ( data[ i ].Field == (ushort)PRINTERJOBNOTIFICATIONTYPES.JOB_NOTIFY_FIELD_TOTAL_PAGES &amp;&amp;
      data[ i ].Type == (ushort)PRINTERNOTIFICATIONTYPES.PRINTER_NOTIFY_TYPE )
  {
      uint pagesCount = data[ i ].NotifyData.adwData[ 0 ];
  }
  </code></pre>
  
  <p>But I always get the wrong pages.
  And I tried use "PrinterQueueWatch" and the total pages always 0.</p>