How to check weather bookmark pane is visible or not?

how to check weather bookmark pane is visible or not?

@kranthireddyr

Thank you for contacting support.

We would like to request you to share a sample file along with the screenshots to elaborate your requirements. Please also share the steps to check the same using Adobe Acrobat, so that we may proceed to help you out.

@kranthireddyr,

In addition to the above reply, please also try the following code example:
C#

string dataDir = @"c:\pdf\test\";
// Change Viewer Preferences
PdfContentEditor contentEditor = new PdfContentEditor();
contentEditor.BindPdf(dataDir + "MyPdf.pdf");
int view = contentEditor.GetViewerPreference();
if (view == ViewerPreference.PageModeUseOutlines)
    Console.WriteLine("Pages view in the Navigation Panel");
else if (view == ViewerPreference.PageModeUseThumbs)
    Console.WriteLine("Bookmark view in the Navigation Panel");

Not working as expected.

I have a pdf document having some bookmarks but the document bookmark pane is not visible by default.

so i need to check whether the bookmark pane is visible or not?

please refer my document.

Jay-Test-Doc-with-Bookmarks.pdf (38.7 KB)

@kranthireddyr

We would like to request you to use below code samples in your environment and then share your kind feedback with us. You can set the bookmark pane to be visible by default while using the code snippet below:

PdfContentEditor pdfContentEditor = new PdfContentEditor();
pdfContentEditor.BindPdf(dataDir + "Jay-Test-Doc-with-Bookmarks.pdf");
ViewerPreference viewerPreference = new ViewerPreference();
pdfContentEditor.ChangeViewerPreference(ViewerPreference.PageModeUseOutlines);
pdfContentEditor.Save(dataDir + "Jay-Test-Doc-with-Bookmarks_18.3.pdf");

and you can check visibility of bookmark pane by using following code snippet:

PdfContentEditor contentEditor = new PdfContentEditor();
contentEditor.BindPdf(dataDir + "Jay-Test-Doc-with-Bookmarks_18.3.pdf");
int view = contentEditor.GetViewerPreference();
if ((view & ViewerPreference.PageModeUseOutlines) != 0)
 Console.WriteLine("Bookmark view in the Navigation Panel");

We hope this will be helpful. Please feel free to contact us if you need any further assistance.