I am using the Acrobat 5.0 SDK and developing in
VC++. I am trying to create new bookmarks for a document. I get the
root of the tree and then append the bookmark as a new child. If there are
existing bookmarks, it works fine. But if there are no bookmarks, the new
bookmark does not display. In the documentation for PDDocGetBookmarkRoot()
it says that a valid value is returned if the document has no bookmarks.
Here is some code I am using:
PDBookmark bmRoot =
PDDocGetBookmarkRoot(pdDoc);
if(PDBookmarkIsValid(bmRoot))
PDBookmark newBm = PDBookmarkAddNewChild(bmRoot, "New Bookmark Title");
PDBookmark newBm = PDBookmarkAddNewChild(bmRoot, "New Bookmark Title");
Any ideas? Again, this works if bookmarks exist for the document, but does not work if there are no bookmarks. PDBookmarkIsValid() is returning true in all cases. Thanks.
-Chris
