Skip to main content
kumaran20
Participating Frequently
Jun 13, 2016 9:50 AM UTC
Answered

Javascript to insert dynamic stamp

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 is closed to new replies. Start a new post to keep the conversation going.
try67
try67Correct answer
Community Expert
Jun 14, 2016 8:51 AM UTC

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.

14 replies

JR Boulay
Community Expert
Community Expert
Jun 13, 2016 11:04 AM UTC
Acrobate du PDF, InDesigner et Photoshopographe
try67
Community Expert
Community Expert
Jun 13, 2016 10:01 AM UTC

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.

Translate
kumaran20
kumaran20Author
Participating Frequently
Jun 13, 2016 10:39 AM UTC

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.

Translate
try67
Community Expert
Community Expert
Jun 13, 2016 11:02 AM UTC

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

Translate