How do I set default open/close states for Bookmarks in PDF?
281 views
Skip to first unread message
Support
unread,
Oct 28, 2009, 6:33:12 PM10/28/09
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
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
Q: How do I set default open/close states for Bookmarks in PDF?
I have a PDF with bookmarks. I would that the Bookmarks are opened by
default when I open the document in Adobe Reader. I would like to
achieve this programmatically after generating the PDF file. Basically
I need to know if it’s possible to do this with the PDFNet library.
---------------
A: You can use bookmark.SetOpen() opens or closes the bookmark so that
it shows its children.
Use IsOpen() to check if a Bookmark is open.
Support
unread,
Oct 30, 2009, 2:01:12 PM10/30/09
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
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
Q: I already tried this, but it only works when the bookmarks side
window is opened. The SetOpen() function expands a bookmark in the
bookmark tree so you its children are visible.
What I needed was to be able to set the flag in the PDF's m,etadata
that indicates that the side windows showing the Bookmark tree is
visible by defaut when you load the file in a PDF Viewer.
-----------
A: To tell a PDF viewer to displays document plus bookmarks pane use
SetPageMode() in pdftron.PDF.PDFDocViewPrefs. For example: