Skip to main content
Participant
Aug 23, 2023 7:17 AM UTC
Question

Add document level script in PDF

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-q300987.aspx 

 

Thanks in advance.

 

    This topic is closed to new replies. Start a new post to keep the conversation going.

    1 reply

    Joel Geraci
    Community Expert
    Community Expert
    Aug 23, 2023 12:28 PM UTC

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

    Translate