Copy link to clipboard
Copied
how to add a documnet ID to the form
All PDF files have a unique document ID assigned by the creating program. You can see it in the file properties under the Advance Properties under the XMP Media Properties Management.
Then there is the docID object which is an array of two strings. The first element is the permeant id and the second is the change ID that identifies the changed copies.
Do you mean some sort of sequence number or control number?
Copy link to clipboard
Copied
What do you mean by "document ID", exactly?
Copy link to clipboard
Copied
All PDF files have a unique document ID assigned by the creating program. You can see it in the file properties under the Advance Properties under the XMP Media Properties Management.
Then there is the docID object which is an array of two strings. The first element is the permeant id and the second is the change ID that identifies the changed copies.
Do you mean some sort of sequence number or control number?
Copy link to clipboard
Copied
If that's what OP means then you can set up a form field to contain this value, like this (as a doc-level script):
this.getField("DocID").value = this.docID;
Copy link to clipboard
Copied
Remember this property is an array of 2 values. Using your script the doc permanent ID between 2 copies of the PDF will never be equal. You need to compare the first element for the docID for the 2 copies. The second element will be unique for each updated copy.
this.getField("DocID").value = this.docID[0];
this.getField("UpdateID").value = this.docID[0];
Try the following in the JavaScript console:
for(i in this.docID) console.println(i + ": " + this.docID);
The result is 2 values:
0: 92B876C5B50242E19A8B954BF56F02BC
1: 03FA3AB79ADAD64EAC1F42867688D197