These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Dynamic buttons

YupYup
Registered: Feb 17 2011
Posts: 3
Answered

I have a form that has a bunch of routing required for workflow. We've designed this in Adobe Acrobat forms (not LiveCycle) and have the workflow working, but we would like to add a Dynamic Button (Approved - which shows the username, date, time) of the person who approved the submission.
 
Looking for some help on making a button on the form (Approved) that when pressed, will place the dynamic stamp next to it. We have a bunch of employees all over the country so I'd like to avoid training them on adding the stamp manually. They may not do it, may cover information, etc... I want to take all of the manual insertion out of the picture.
 
Is this even possible?

My Product Information:
Acrobat Pro 10.1, Windows
try67
Expert
Registered: Oct 30 2008
Posts: 2398
A stamp is a kind of annotation, therefore you can add it programmatically using doc.addAnnot().
For example, this will add an Approved stamp at the bottom left corner of the first page:
this.addAnnot({type:"Stamp", page:0, rect: [15,15,250,75], AP: "Approved"})

I recommend you read up on the AP property of the Annotation object. It contains explanations on how to use it.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

YupYup
Registered: Feb 17 2011
Posts: 3
Thanks for getting back so quickly try67.

The script you provided does indeed insert an "Approved" stamp in the bottom corner. I've been playing, but can't seem to get it to insert the dynamic version of the approved stamp (the one that shows the username, date, time)

Any suggestions?
try67
Expert
Registered: Oct 30 2008
Posts: 2398
Like I said, you need to find the AP name for that one. I'm not sure that this method will work well with dynamic stamps, though. I haven't tried it myself.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4307
Accepted Answer
You need to tweak out the stamp's name.

I added:

console.println("Stamp Name: " + event.source.stampName);

to the stamps calculation, closed all instances of Acrobat, restarted Acrobat, created a blank page, add the dynamic Approved stamp, opened the JS console and found the following statement:

Stamp Name: #DApproved

Replaced "Approved" with "#DApproved" into the provided script, ran the script and obtained the desired result.

You can find more information about the intenals of dynamic stamps in Dynamic Stamp Secrets by Thom Parker.If you look carefully you will see that the "Approved" stamp is not the same as the approved stamp shown in the "Standard Business" category, that stamp's name is "SBApproved".

George Kaiser

YupYup
Registered: Feb 17 2011
Posts: 3
You guys are fantastic! Thank you very much for your expertise and time assisting me with this project.

Very appreciated!