Skip to main content
Participant
July 27, 2019
Answered

Dynamic stamp dialogue not appearing

  • July 27, 2019
  • 1 reply
  • 1832 views

Acrobat DC Pro on Win 10 Pro.

I have created a dynamic stamp and called the file "Receipt.pdf". I want to use it to signify that my invoice has been paid by my client.

There are two text fields, one above the other, the first to show the current date and the second field I want to generate a dialogue for me to insert particulars of the payment, e.g., a cheque number or other identifier.

When I apply the stamp to the pdf invoice, the date field works fine, but no dialogue is generated. So the stamp appears with the current date and a blank space beneath it.

The "custom calculation script" for the date field is:

event.value = (new Date()).toString();

AFDate_FormatEx("dd mmm yyyy");

The script for the dialogue field is:

var cAsk = "Enter Receipt Details" ;

var cTitle = "Receipt Details" ;

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

{

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

  event.value = cMsg;

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

}

I am ignorant about javascript and have merely done my own research and followed other examples which seem to work. Would some kind person please help me to get that dialogue field working properly? Any advice will be much appreciated, but please keep it simple!

This topic has been closed for replies.
Correct answer Bernd Alheit

The file name is not the stamp name.

1 reply

Bernd Alheit
Community Expert
Community Expert
July 27, 2019
Participant
July 28, 2019

Thanks for your reply.

I have deleted the stamp and re-created it to get an original file name, which is OG3txYF8ow2Bqq3sCWTXoD.pdf.

The script is now:

var cAsk = "Enter Receipt Details" ;

var cTitle = "Receipt Details" ;

if (event.source.forReal && (event.source.stampName == "OG3txYF8ow2Bqq3sCWTXoD"))

{

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

  event.value = cMsg;

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

}

However, the result is still the same as originally described.

Bernd Alheit
Community Expert
Bernd AlheitCommunity ExpertCorrect answer
Community Expert
July 28, 2019

The file name is not the stamp name.