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, Sean - Tracker, Chris - Tracker Supp, Tracker Supp-Stefan, Ivan - Tracker Software

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

Open all Stickynotes by code?

Post by magthenop » Wed Dec 01, 2010 7:58 am

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: 13439
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Open all Stickynotes by code?

Post by Tracker Supp-Stefan » Wed Dec 01, 2010 10:42 am

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 » Wed Dec 01, 2010 10:57 am

:mrgreen: Thanks :mrgreen:

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

Re: Open all Stickynotes by code?

Post by Tracker Supp-Stefan » Wed Dec 01, 2010 11:01 am

Welcome :)

Post Reply