Skip to main content
kumaran20
Participating Frequently
June 13, 2016
Answered

Javascript to insert dynamic stamp

  • June 13, 2016
  • 2 replies
  • 12161 views

In PDF form, Java script for inserting dynamic stamp "Received" or "Approved" along with default author, date etc..

I have created a PDF Form button, when the button is clicked, the "Received" stamp from Dynamic stamp annotation to be inserted in the particular position. Please, let me know the java script for this action.

This topic has been closed for replies.
Correct answer try67

Hi, when i use    "this.selectedAnnots[0].AP"   it shows that it is undefined.

Thanks


Make sure you select an applied stamp comment (using the mouse) before running this code.

2 replies

JR Boulay
Community Expert
Community Expert
June 13, 2016
Acrobate du PDF, InDesigner et Photoshopographe
try67
Community Expert
Community Expert
June 13, 2016

You need to find out the AP value of that stamp and then you'll be able to do it using the addAnnot method of the Doc object.

kumaran20
kumaran20Author
Participating Frequently
June 13, 2016

Thanks, i can able to find AP value for standard stamps, but could not able to use Dynamic stamps (Received, Approved, Reviewed,..) with all features.

try67
Community Expert
Community Expert
June 13, 2016

It's exactly the same thing... Use the same method you use for the standard stamps for the dynamic ones.

I like to apply a stamp to a file and then select it and run this code from the JS console to find out its AP value:

this.selectedAnnots[0].AP

Edit: fixed the code