title: Ghostscript: PDF total pages
body: <p>I'm using Ghostscript library API (wrapping from C#) to print PDF documents from my application.<br>
  With the '<em>-dFirstPage</em>' and '<em>-dLastPage</em>' parameters I'm able to select an range of pages to be printed, but how about the total number of a PDF's pages?  </p>
  
  <p>It is not very nice to allow a user to select a page interval from 2 to 10 when, let me say, the PDF document has only 4 pages. </p>
  
  <p>Consider that I'm using Ghostscript library through the <em>gsapi_init_with_args</em> API library call.  </p>