You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to PDFTron PDFNet SDK
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.
Ryan
unread,
Aug 15, 2016, 8:47:01 PM8/15/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to PDFTron PDFNet SDK
While it is an iterator can remain valid after modification of the container, this is not true for all container iterators, and is not currently true for our page iterator.
We will look to improve this in the future, but currently you would need to get a new iterator.