• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

how to add a documnet ID to the form

New Here ,
Apr 03, 2016 Apr 03, 2016

Copy link to clipboard

Copied

how to add a documnet ID to the form

TOPICS
Acrobat SDK and JavaScript

Views

519

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Apr 04, 2016 Apr 04, 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?

Votes

Translate

Translate
Community Expert ,
Apr 04, 2016 Apr 04, 2016

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 04, 2016 Apr 04, 2016

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 04, 2016 Apr 04, 2016

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;

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 04, 2016 Apr 04, 2016

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines