Skip to main content
Participating Frequently
May 5, 2021
Answered

Custom Dynamic Stamp - Pop's up twice & have to enter all fields twice - why!?

  • May 5, 2021
  • 3 replies
  • 10087 views

I have successfully created a custom dynamic stamp with many custom Java script fields which pop up for you to enter the content which will be filled in to the stamp once placed 

 

The whole sequence has 6 pop ups where you enter the information, then when i go to drop the stamp in place on the document it calls up the whole sequence again, entering all the info a second time. Once comepleted the second time, the content is all correct and you can place it into the document but how do i stop having to do the process twice?

 

Also, the custom stamp won't enter on some scanned document the first attempt - why would this be? 

 

HELP! 

This topic has been closed for replies.
Correct answer Thom Parker

Stamp scripts are called several times for different reasons. For example, they are called everytime any stamp in the same stamp file is displayed on the stamp menu, or when a preview for any stamp in the stamp file, as well as when the stamp is actually placed. To only display popups when the stamp is placed, the stamp script has to be properly qualified. It also helps to name the stamp properly.  

You can read about it here:

https://acrobatusers.com/tutorials/dynamic_stamp_secrets/

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

 

3 replies

Participant
December 8, 2021

Hi bobbieb56686240! Did you find the answer? I have the same question and have read through all of this! 😞 

Thom Parker
Community Expert
Community Expert
December 8, 2021

The solution is to properly qualify the script that display the stamp popup, so that it only displays when the stamp is actually being placed. The code for doing the qualification is discussed in these articles, take a look and let us know what part you do not understand:

 

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

Free : https://acrobatusers.com/tutorials/dynamic_stamp_secrets/

 

 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Participant
December 9, 2021

I cant find where I am going wrong:

Here is my Script:

if((event.source.forReal)&&(event.source.stampName == "#Contractors"));
this.getField("CO0210").value=app.response("Contractor #:");
this.getField("LN0210").value=app.response("Contractors Last Name:");
this.getField("CN0210").value=app.response("CLIENTS NAME:");
this.getField("INV0210").value=app.response("FULL INVOICE NUMBER:");

 

I have attached the file as well. Any help would be greatly appreciated 🙂 -Dena

Thom Parker
Community Expert
Thom ParkerCommunity ExpertCorrect answer
Community Expert
May 5, 2021

Stamp scripts are called several times for different reasons. For example, they are called everytime any stamp in the same stamp file is displayed on the stamp menu, or when a preview for any stamp in the stamp file, as well as when the stamp is actually placed. To only display popups when the stamp is placed, the stamp script has to be properly qualified. It also helps to name the stamp properly.  

You can read about it here:

https://acrobatusers.com/tutorials/dynamic_stamp_secrets/

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

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Participating Frequently
May 19, 2021

Hi Guys, 

I have followed and read these and this isnt helping - the stamp is still popping up 2 times. 

 

Bernd Alheit
Community Expert
Community Expert
May 19, 2021

Have you changed the file?

Inspiring
May 5, 2021

It's hard to say for sure without seeing the stamp file in question. If you can post it, we can take a look at it.

Participating Frequently
May 5, 2021

Thank you for replying.. post pictures or attach the stamp file itself?

 

Cheers! 

Bernd Alheit
Community Expert
Community Expert
May 5, 2021

Attach the stamp file.