Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Thu Nov 14, 2019 7:46 am

Hello,

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?

Philipp Lange
 
Posts: 11
Joined: Fri Jun 14, 2019 9:24 am

Thu Nov 14, 2019 9:05 am

Hi,

Thanks for your inquiry.
Sorry that Spire.PDF doesn't support only expanding the first level of bookmarks at present.
We will consider adding the new feature in our future upgrade. If there is any good news, we will let you know.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Mon Dec 16, 2019 9:23 am

Hi,

Thanks for waiting.
Now the new feature of expanding the specific bookmark has been implemented. Please download the Spire.PDF Pack(Hot Fix) Version:5.12.15.
Our website link: https://www.e-iceblue.com/Download/down ... t-now.html
NuGet link:https://www.nuget.org/packages/Spire.PDF/5.12.15

Below is sample code for your reference:
Code: Select all
doc.Bookmarks[0].ExpandBookmark=true;
(doc.Bookmarks[0] as PdfBookmarkCollection)[1].ExpandBookmark= false;


Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Mon Dec 16, 2019 1:13 pm

Hello,

I downloaded the new version and was successfully able to integrate the new functionality into my project. :)

Thank you,
Philipp Lange

Philipp Lange
 
Posts: 11
Joined: Fri Jun 14, 2019 9:24 am

Tue Dec 17, 2019 1:28 am

Hi Philipp,

Thanks for your feedback.
If there is any question, please feel free to contact us.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.PDF