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

Is it possible in Acrobat Pro or DC Pro to place a label on each pdf showing that pdf's file name and a unique number? Does it involve special scripting of the Dynamic Stamps?

New Here ,
May 14, 2016 May 14, 2016

Copy link to clipboard

Copied

I am wanting to store a batch of pdfs.  I want to place on each document a visible annotation or label showing its file name and a unique number or barcode. How can this be done?  Thank you.

TOPICS
Acrobat SDK and JavaScript , Windows

Views

384

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
Advocate ,
May 14, 2016 May 14, 2016

Copy link to clipboard

Copied

LATEST

The simplest way to create a unique number would be the date at the time the file is saved. The JavaScript Date object has the getTime() function, which displays the number of milliseconds since a reference date (which, I think, is January 1st, 1990, midnight). Of that number, one could, for example, just take the last 10 or so digits, to keep the number readable.

When you apply the stamp, you will therefore need a little script:

var myID = new Date().getTime() ;

(as a base), and then use the variable as value for the stamp.

It would also be possible to create a field for that information, and (if there are no other Annotations (fields, comments, links, etc.) in the document, flatten them after filling). Or, the Watermark function would work as well.

The trigger event would be willSave.

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