Getting a form and annotation coordinates.

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

jarathna
User
Posts: 10
Joined: Fri Feb 21, 2014 8:56 am

Getting a form and annotation coordinates.

Post by jarathna »

Hi,
I have the following requirement:
1) I need to annotate a document not programmatically but with the XChange viewer or the plug in.
2) I need to access these annotations by JavaScript or through the SDK whichever is possible.
3) Whenever I do a single click on any annotation I should get a popup in which I can display text boxes to enter annotation related details
4) I need to get the coordinates of these annotation programmatically.
5) I need a unique number to identify any one of these annotations.
6) When submitting the popup (Form) I need to store details like annotation unique id, coordinates of the annotation the details entered in the textbox in the popup etc in a background sql database.
7) Whenever I click anyone of these annotations I should get the relevant details in the database and display them in the popup.

We are using annotations in the documents to enter certain details in the document to a database.
I would certainly appreciate your timely help

Thanks and regards
JK
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2445
Joined: Thu Jun 30, 2005 4:11 pm

Re: Getting a form and annotation coordinates.

Post by Vasyl - PDF-XChange »

Hi, jarathna

1), 2) - no problem, you can do it...
3) - currently - only by dbl click
4) - by JavaScript
5) - use JS to get "annot.name" prop
6) - no easy way, but you can:
a. enable some special event sending by:
pdfControl.SetProperty("Notifications.Selection.Filter", "Annotations", 0);
pdfControl.SetProperty("Notifications.TextEditor.Filter", "End", 0);
b. catch the event(type=PXCVA_OnNamedNotify, name="Notifications.Selection") and get name of just selected annot by "GetSelectedAnnot" document's method and by "GetAnnotName" page's method.
c. wait for event(type=PXCVA_OnNamedNotify, name="Notifications.TextEditor"), by JS get details of a annot (with name that you get in 'c.') and save it into your DB
7) solution is similar to 6) - catch the event(type=PXCVA_OnNamedNotify, name="Notifications.Selection"), obtain name of just selected annot and by JS update details of it from your DB.

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.