Hi, guys.
Now my question, is it possible to get some event when the user clicks on an annotation (highlight or stickernote doesn't matter) and the annotation gets that dashed line around it?
I want to enable/disable some menu items depending on that selection.
Unfortunately, but no there is no easy way for this in current realization.
1. You may turn on selection notifications by:
Code: Select all
SetProperty("Notifications.Selection.Filter", "Annotations",0);
after this you will be able to get the necessary events through IPDFXCviewEvents::OnEvent routine.
2. and use java-script(RunJavaScript function) for details about a selected annotation(or to modify it), such as:
Code: Select all
var annots = this.selectedAnnots;
annots[0].subject; // for example
3. and switch off/on any UI-command:
Code: Select all
SetProperty("Commands["Copy"].State", "offline",0);
SetProperty("Commands["Paste"].State", "offline",0);
SetProperty("Commands["Delete"].State", "offline",0);
HTH
PDF-XChange Co. LTD (Project Developer)
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.