Detect whether bookmarks panel is open

Contributor ,
Dec 13, 2018

Copy link to clipboard

Copied

I have JavaScript that runs best with the bookmarks panel open. I know app.execMenuItem("ShowHideBookmarks"); toggles the bookmarks panel but I've not been able to find a way to detect whether it's already open.

Is there one?

Thank you

Most Valuable Participant
Correct answer by try67 | Most Valuable Participant

Yes, you can use: this.pane

It will return "B" when the bookmarks panel is open, and something else if it's not. For example, "T" if the pages thumbnails panel is open, or "N" if no panels are open.

TOPICS
Acrobat SDK and JavaScript, Macintosh, Windows

Views

173

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Detect whether bookmarks panel is open

Contributor ,
Dec 13, 2018

Copy link to clipboard

Copied

I have JavaScript that runs best with the bookmarks panel open. I know app.execMenuItem("ShowHideBookmarks"); toggles the bookmarks panel but I've not been able to find a way to detect whether it's already open.

Is there one?

Thank you

Most Valuable Participant
Correct answer by try67 | Most Valuable Participant

Yes, you can use: this.pane

It will return "B" when the bookmarks panel is open, and something else if it's not. For example, "T" if the pages thumbnails panel is open, or "N" if no panels are open.

TOPICS
Acrobat SDK and JavaScript, Macintosh, Windows

Views

174

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Dec 13, 2018 0
Most Valuable Participant ,
Dec 13, 2018

Copy link to clipboard

Copied

Yes, you can use: this.pane

It will return "B" when the bookmarks panel is open, and something else if it's not. For example, "T" if the pages thumbnails panel is open, or "N" if no panels are open.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 13, 2018 1
Contributor ,
Dec 18, 2018

Copy link to clipboard

Copied

Thanks try, worked great. Where would that info be? Somewhere in the dev kit, maybe? I didn't see it in the api reference.

Thanks again

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 18, 2018 0
try67 LATEST
Most Valuable Participant ,
Dec 18, 2018

Copy link to clipboard

Copied

It's an undocumented feature, actually, so use it with care.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 18, 2018 0