Select Annotation

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

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

ToddM
User
Posts: 4
Joined: Wed Nov 04, 2009 4:25 pm

Select Annotation

Post by ToddM »

Is there a way to set which annotation(s) are selected via code?
User avatar
Chris - PDF-XChange
Site Admin
Posts: 798
Joined: Tue Apr 14, 2009 11:33 pm

Re: Select Annotation

Post by Chris - PDF-XChange »

Hi Todd,

I believe the answer is yes using Javascripting in accordance with the Abobe Acrobat Javascript API which we support in the SDK.

Please have a look at the Annotation section: http://www.adobe.com/devnet/acrobat/pdf ... erence.pdf

Hope that helps, if you require further information, pleae do get back to us.

Chris
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.


Chris Attrell
Tracker Sales & Support North America
http://www.tracker-software.com
ToddM
User
Posts: 4
Joined: Wed Nov 04, 2009 4:25 pm

Re: Select Annotation

Post by ToddM »

Maybe I am missing it but I don't see any reference to programmatically selecting an annotation using the Javascript API. Can you provide an example of how to do this?
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: Select Annotation

Post by Corwin - Tracker Sup »

As sample, you can try to use next JS code:

Code: Select all

var annots = this.selectedAnnots;
if (annots.length > 0)
{
   annots[0].fillColor = color.green;
   annots[0].strokeColor = color.green;
};
HTH