script not running on dynamic stamp

By itself my dynamic stamp script runs fine. (asking for a revision number and entering it in a text box) but when I stamp another pdf with it. Nothing happens with the stamp/script.


Stephane Emond


4 Answers

Voted Best Answer

I think you have made a very common error. The stamp tools in Acrobat will only create a static stamp. If you have dynamic code on a PDF page, and then convert that PDF page into a stamp, Acrobat flattens out all the form fields. Acrobat only uses the page as an image for creating the stamp. All the code is lost.

To make a dynamic stamp you add the code afterwards, to the stamp file created by Acrobat.

You'll find a lot more info on dynamic stamps here:
http://www.pdfscripting.com/public/department53.cfm

Thom Parker
The source for PDF Scripting Info pdfscripting.com

The Acrobat JavaScript Reference, Use it Early and Often

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

Having trouble, Why Doesn't my Script Work


By Thom Parker   

What do you mean, by itself?

You may have very well built the dynamic stamp incorectly. Have you read this article?
http://acrobatusers.com/tutorials/dynamic_stamp_secrets

Thom Parker
The source for PDF Scripting Info pdfscripting.com

The Acrobat JavaScript Reference, Use it Early and Often

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

Having trouble, Why Doesn't my Script Work


Thom Parker   

Thom,

I meant, when I created the stamp with the code and I tried it to check for error it ran fine.
Got the msg box asking me the rev number, entered the answer in the box and it wrotes down the final Rev.: 00 in the text box.

could it be due to the location of where my stamp is? I copied it to the correct folder as explained on the various tutorial. Then I go through the stamp menu, create stamp... add my stamp to a my new Personnal Stamp directory and once I am done it shows up in the menu there.

I tried to add an existing dynamic stamp coming with adobe to my directory and I get the same issue, the stamp becomes static...


Stephane Emond   

Many thanks, it works now.

So basically you create your form/stamp without the fileds.
Then add it to the stamp menu, go to where adobe placed it under the [user] folder and add then the textbox with the script, resave it and then it is ready for use.




Stephane Emond   


Please specify a reason: