To print a range of pages in a folio, you create a page iterator with a page range and use the iterator to print.
For example, if you have a 10-page folio called myPageFolio, to print only pages 3, 5, 7, and 9:
- Create a page range.
TStandardPageRange* range = new TStandardPageRange();
- Set the page range to pages 3 through 9.
range->SetRange(3,9);
- Set the page range to include only the odd pages.
range->Intersection(TOddPageRange());
- Create a page iterator with the page range. The iterator adopts the range.
TPageIterator* iterator = myPageFolio.CreatePageIterator(range);
- Use the iterator to print and delete the iterator.
iterator->Print(jobDescription);
delete iterator;