Skip to main content
Participating Frequently
Jan 25, 2020 5:23 AM UTC
Question

Why doesn't the javascript run in my dynamic stamp?

I've followed the instructions on creating a dynamic date stamp.

 

The drama is I either have 2 results. The date that stamps is created is always displayed, or nothing at all.

 

Neither are the desired result.

 

Are there any scerity steps required to allow the javascript to run?

 

Is it something else?

That's the javascipt i've used:

event.value = (new Date()).toString();
AFDate_FormatEx("dd mmm yyyy");

 

 

Any thoughts appreciated.

 

Bruce

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

6 replies

Thom Parker
Community Expert
Community Expert
Jan 26, 2020 10:48 PM UTC

It sounds like you are using the Acrobat Stamps tools with the stamp file (such is the stamp import and create). These tools destroy all scripts within the stamp file. You have to edit the stamp file with Acobat to add the fields and scripts, then save the file into the Acrobat Stamp folder.  

You'll find everything you ever wanted to know about Acrobat Dynamic stamps here:

https://www.pdfscripting.com/public/All_About_PDF_Stamps.cfm

 

 

Translate
Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
ls_rbls
Community Expert
Community Expert
Jan 25, 2020 9:51 AM UTC

I was going to suggest to also use this guidance from adobe helpx as a reference: https://helpx.adobe.com/acrobat/kb/create-custom-dynamicstamp.html

 

 

Translate
Technical Generalist
by9811Author
Participating Frequently
Jan 27, 2020 11:37 PM UTC

Those are the instructions I followed.

Translate
Thom Parker
Community Expert
Community Expert
Jan 28, 2020 12:39 AM UTC

Can you post a link to your stamp file.

Translate
Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
try67
Community Expert
Community Expert
Jan 25, 2020 9:26 AM UTC

Where did you place the code?

Translate
by9811Author
Participating Frequently
Jan 27, 2020 11:38 PM UTC

In the javascript dialog box in the advanced section where the instructions from Adobe told me to.

Translate