# IPrint::GetPageInfo

Retrieves the number of a document’s first page as well as the total number of pages.

HRESULT GetPageInfo(

LONG *nFirstPage, | // Pointer to number of first page
LONG *pcPages | // Pointer to total number of pages
); |

Parameters

pnFirstPage
  [out] Pointer to the page number of the first page. May be NULL, indicating the caller doesn’t need this number. If IPrint::SetInitialPageNum has been called, this parameter should contain the same value passed to that method. Otherwise, the value is the document's internal first page number.
pcPages
  Pointer to the total number of pages in this document. May be NULL, indicating the caller doesn’t need this number.

Return Value

S_OK
  The first page was set as requested.
E_UNEXPECTED
  An unknown error occurred.