These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

annotation change detection

acrobat_helpme
Registered: Apr 11 2007
Posts: 2

i need to detect if a user change ONLY annotations (add, update, delete annotation ) in a pdf file.
 
I checked xapMM:DocumentID
and
xapMM:InstanceID
 
Unfortunately InstanceID change even if there are no real updates...
 
I can't compare these 2 documents each time.
  
I need a batch javasctipt solution.
 
Any ideas ?

My Product Information:
Acrobat Standard 8, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
You can get an accounting of the annotations with JavaScript using the "doc.getAnnots()" function. Of couse you have to have the previous state handy for comparison. something you can do is save the annots to an FDF file with the "doc.exportAsFDF()" function. Then when you are checking the new document, import the saved annots into a blank doc. This should allow you to compare the two annot lists.

Another method is to sign the doc before new annots are added to it. Then use the "field.signatureGetModifications()" function. This one is problematic though, I don't think is will allow you to get incremental updates for changes after the signature was made, but you'll have to check it out to be sure.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script