Skip to main content
Participant
March 28, 2017
Question

How to create dynamic PDF stamp?

  • March 28, 2017
  • 2 replies
  • 3076 views

We are trying to setup a dynamic stamp in Adobe Acrobat Standard DC 2015.  We have created the file and the stamp is working as a static stamp.  We would like to automatically insert the current date and open a user input window to enter a line of characters. I don't have any javascript experience and we have been trying to piece together how to do this from articles on the web.  What we have so far is

var cDate = util.printd("dd/mm/yyyy", new Date());

var cAsk = "Payment Method" ;

var cTitle = "Payment Method:  ";

if(event.source.forReal && (event.source.stampName == "#paid_stamp"))

{

  var cMsg = app.response(cAsk, cTitle);

  event.value = cMsg;

  event.source.source.info.exhibit = cMsg;

}

We have gone into Prepare Form and put this into the Text Field Properties / Calculate tab of the first text filed (the date field). Does anyone have a step-by-step guide on how to make this work. It seems very complicated for such a simple requirement.

This topic has been closed for replies.

2 replies

Inspiring
March 28, 2017

You probably don't want or need this line:

  event.source.source.info.exhibit = cMsg;

Karl Heinz  Kremer
Community Expert
Community Expert
March 28, 2017

Just to elaborate on George's warning: The stamp with this line will work in Adobe Acrobat, but will not work in the free Adobe Reader.

Bernd Alheit
Community Expert
Community Expert
March 28, 2017
Participant
March 29, 2017

Thanks for your reply.  I did look at this article but it refers to Adobe Acrobat XI and so much of the explanation does not work with Adobe Acrobat Standard DC 2015.  The concepts may be similar but how to make them work is the problem I am having.

I looked at Adobe Acrobat DC Dynamic Stamp Tutorial - YouTube which is a more up to date look at dynamic stamps. But I think he is using the 'Pro' version because the debugging tool is not in my version.  This means I can't find where the stamp template is stored using    app.getPath(“user”, “stamps”);  I can't find it in C:\Program Files (x86)\Adobe\Acrobat 2015\Acrobat\plug_ins\Annotations\Stamps\ENU or in C:\Users\Patrick\Adobe Stamp.

So I then tried to create the template using Organise Pages / More / Page Templates method he describes, but I can't find the template file name to work on the stamp file. 

Can this be done in Acrobat Standard.  Such a lot of mucking around for such a simple thing; add the date and a text filed.

Bernd Alheit
Community Expert
Community Expert
March 29, 2017

With ctrl-j you can access the console.