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

Add document level script in PDF

New Here ,
Aug 23, 2023 Aug 23, 2023

Hello,

We want to automate the proess to add script in PDF file using some PDF SDK or API. 

We want to add a field in PDF file  and execute Script to display today's date whenever  user open's file to print it.

var theDate = new Date();
theDate = theDate.setDate(theDate.getDate() + 28);

this.getField("Today").value = util.printd("mm/dd/yyyy", new Date());
this.getField("InOneMonth").value = util.printd("mm/dd/yyyy", theDate);

 

Below article specifies the steps but we want to achive it through code / api integration.

 

https://answers.acrobatusers.com/Insert-current-date-text-field-todays-date-todays-date-4-weeks-q300... 

 

Thanks in advance.

 

151
Translate
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 ,
Aug 23, 2023 Aug 23, 2023
LATEST

We don't currently have an API to do this. However, you can automate it in Acrobat.

Translate
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
Resources