Need to add a countdown timer to a Pdf | Community
Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

14 replies

October 19, 2010

Hi there,

I have tried opening your JavaScriptClock.pdf in LiveCycle and a message appears saying that some of the script needs updating to work in Designer and large tracts of it are commented out.  Should this work fine in Designer?  Are there syntax variations between Acrobat an Designer?

I need to make a very simple timer so I can time-out my forms.  Would you be able to point me to any examples of how this has been achieved in Designer?

I have tried following the instructions here but have not had much luck:

http://acrobatusers.com/tutorials/working-date-and-time-acrobat-javascript-part-3-3

For example Designer doesn't seem to recognise app.setInterval(), I am guessing that this is Acrobat specific.

Thanks very much for your contributions,

Kieran

Thom_Parker
New Participant
February 21, 2010

Scripts in a regular PDF are entered using Acrobat Professional,  That's where you'll find the "Advanced/Document Processing" menu which contains several JavaScript tools.   LiveCycle forms have to be edited in LiveCycle Designer.  You can find lots of information on scripting AcroForms (regular PDF forms) and LiveCycle forms at www.acrobatusers.com.

Here's a video that covers the basics of LiveCycle scripting.

https://admin.adobe.acrobat.com/_a200985228/p87746471/

You'll also find gobs of info on scripting; videos, sample files, etc. at www.pdfscripting.com.

Thom Parker
The source for PDF Scripting Info
pdfscripting.com

The Acrobat JavaScript Reference, Use it Early and Often
http://www.adobe.com/devnet/acrobat/javascript.html

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

February 21, 2010

Thanks! I will read it through. Its a complicated process. I am having trouble locating where to look at the Javascript in LiveCycle of the pdf. I also do not see that menu lsting Advanced / Javascript menu

Ill give it a shot - never used Java before.

Thom_Parker
New Participant
February 21, 2010

The scripts in this file are explained in this Article:

http://www.acrobatusers.com/tutorials/working-date-and-time-acrobat-javascript-part-3-3

The functions used for handling time are part of the standard Core JavaScript Date Object. So the only difference between what's done on this file and the equivalent functionality on a LiveCycle form is how the form fields are handled.  And in fact, the functionality in this PDF is generalized so that it's nice looking,controllable, and handles all 3 clocking variations from a single JS timer.  You could write a much, much, simpler count down timer for your own doc.  Be sure to read the article.  It explains how some of the code it works.

Thom Parker
The source for PDF Scripting Info
pdfscripting.com

The Acrobat JavaScript Reference, Use it Early and Often
http://www.adobe.com/devnet/acrobat/javascript.html

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