Skip to main content
This topic has been closed for replies.
Correct answer gkaiseril

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?

2 replies

gkaiserilCorrect answer
Inspiring
April 4, 2016

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?

try67
Community Expert
Community Expert
April 4, 2016

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;

Inspiring
April 4, 2016

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

try67
Community Expert
Community Expert
April 4, 2016

What do you mean by "document ID", exactly?