Q: I know that with PDFDoc.ImportPages(..., true) I can import pages
along with bookmarks associated with the page. However, I cannot find
a method that gets rid of bookmarks that are associated to a page that
is removed. For example, something along the line of
PDFDoc.PageRemove(..., true). Where true, would allow the removal of
Is there a method that removes bookmarks when a page is removed?
A: At the moment there is no method that automatically removes
invalidated bookmarks, however this functionlity can be fairly easy to
implement using the current API:
- Before removing the page you can traverse the bookmark tree (similar
to PrintOutlineTree in Bookmark sample - http://www.pdftron.com/net/samplecode.html#Bookmark).
- If the 'GoTo' action points to the page that you wish to remove
either modify the goto action, remove the action, or remove the
- Remove the page using PDFDoc.PageRemove(...)