I'm looking at removing multiple pages with page iterator. All the examples seem to get a new iterator object before each page removal as such...
pdftron::PDF::PageIterator it;
while (firstPage<=lastPage) {
it = doc->GetPageIterator(firstPage+1);
doc->PageRemove(it);
lastPage--;
}
Isn't this a little wasteful. Isn't it possible to get a PageIterator just once and then use .Next (or not as the case may be if the iterator is pointing to the next page anyway after the existing page has been removed)? I have tried this approach but it throws an error, it must surely be possible.