Open all Stickynotes by code?

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Post Reply
magthenop
User
Posts: 43
Joined: Tue Sep 07, 2010 8:35 am

Open all Stickynotes by code?

Post by magthenop »

How can I open upp all stickynotes (and just the stickynotes) by code or by a command?
And how can I close them again.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17910
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Open all Stickynotes by code?

Post by Tracker Supp-Stefan »

Hello magthenop,

The "Sticky note" is an annotation of type Text, so using JS you should be able to browse through and set the popupOpen property for all anotations of this type to true.

Code: Select all

var annots = this.getAnnots();
for (var i = 0; i < annots.length; i++)
  if(annots[i].type == "Text"){
    annots[i].popupOpen = true;
  }
Best,
Stefan
magthenop
User
Posts: 43
Joined: Tue Sep 07, 2010 8:35 am

Re: Open all Stickynotes by code?

Post by magthenop »

:mrgreen: Thanks :mrgreen:
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17910
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Open all Stickynotes by code?

Post by Tracker Supp-Stefan »

Welcome :)
Post Reply