/// <summary> /// The GetPage method returns the page at the given index, where the page index is 0-based. An exception is raised if the index is invalid. /// </summary> /// <param name="page"></param> /// <returns></returns> public Page GetPage(int page) { VerifyArgumentInRange(page, 0, _pageCount - 1, "page"); Error_Control_Block ecb = new Error_Control_Block(); int pageHandle = 0; Check(ISYS11df.IGR_Open_Page(NeedHandle(), page, ref pageHandle, ref ecb), ecb); return(new Page(NeedHandle(), pageHandle)); }
/// <summary> /// The GetNextPage methods enumerate over the pages of an opened document. Alternativily, use Pages enumeration. /// </summary> /// <returns></returns> public Page GetNextPage() { if (_pageIndex < _pageCount) { Error_Control_Block ecb = new Error_Control_Block(); int pageHandle = 0; Check(ISYS11df.IGR_Open_Page(NeedHandle(), _pageIndex, ref pageHandle, ref ecb), ecb); _pageIndex++; return(new Page(NeedHandle(), pageHandle)); } else { return(null); } }