Expand my Community achievements bar.

Creating a document script for Clock in Acrobat Professional.

Avatar

Level 2

Hi,

I am trying to add a field on my PDF form which shows a continuous clock.

I do not know how to add code to a document script in Acrobat Professional.

"Advaned/ Javascript/ Set Document Actions" is greyed out.

Thanks in advance,

Damo.

3 Replies

Avatar

Level 4

It sounds like you have Acrobat 9 or earlier?  And is this a LiveCycle form?

In therory, clock code is very simple. It just writes the formatted time to a text field. But the details depend on the type of form, LiveCycle or AcroForm

Thom Parker
The source for PDF Scripting Info
pdfscripting.com

All About PDF Stamps in Acrobat and Paperless Workflows - THE BOOK!

The Acrobat JavaScript Reference, Use it Early and Often

Then most important JavaScript Development tool in Acrobat
The Console Window (Video tutorial)
The Console Window(article)

Having trouble, Why Doesn't my Script Work?

Avatar

Level 2

Hi Thom,

I have now downloaded Acrodat Pro XI.

It looks a bit different to acrobat professional 7.

I need to work out where to add scripts.

Thanks,

Damien

Avatar

Level 4

The reason I asked if you had a LiveCycle form is because the "JavaScript" options in Acrobat are only for AcroForms. They don't work on LiveCylce forms. I know this is a LiveCyle forum, but I wanted to be sure before getting into the code.

The first thing you have to know is that LiveCycle Forms are edited in LiveCycle Designer. You can't add scripts to them in Acrobat. And, LiveCycle Designer does not install with Acrobat XI. In fact, the Acrobat XI installer will un-install LiveCycle Designer from earier versions. I don't know if it goes back as far as Acrobat 7, but please check to see if you still have LiveCycle Designer. If not, then you'll need to contact Adobe Support. They should give you a free LC upgrade.

Otherwise, you'll need to convert your form to AcroForm.