I found an option to open all outline items by default:
- Code: Select all
document.ViewerPreferences.BookMarkExpandOrCollapse
However, for my use case, we only want to expand the first level of bookmarks.
Is this possible to do using Spire.PDF?
document.ViewerPreferences.BookMarkExpandOrCollapsedoc.Bookmarks[0].ExpandBookmark=true;
(doc.Bookmarks[0] as PdfBookmarkCollection)[1].ExpandBookmark= false;