Copy link to clipboard
Copied
How to view the javascript for Acrobat DC dynamic stamps?
I've tried multiple times to create a dynamic stamp that will place the date and time the stamp is applied to the stamp.
I have been able to get the stamp to show the time the stamp was originally created but any time the stamp is placed,
it is the same date and time every time.
I want the date to be static after is is placed but I need it to be dynamic WHEN it is placed.
All the Dynamic Stamps in Adobe Acrobat Pro DC do exactly what I want my stamp to do.
How can I view the code associated with a particular stamp that comes with Adobe Acrobat Pro DC?
PLEASE advise!!
Thanks!
Copy link to clipboard
Copied
You can see it in the console:
Copy link to clipboard
Copied
I have the console open and I don't see anything that I can view.
How do I get the Javascript for the stamp to show up in the console?
Copy link to clipboard
Copied
You must open the document with the stamp.
Copy link to clipboard
Copied
Are you talking about the document where I placed the stamp or the Adobe document of the stamp itself?
Where are the Adobe stamp files located? (NOT the custom ones)
If I create a stamp it is located here:
C:\Users\xxxxx\AppData\Roaming\Adobe\Acrobat\DC\Stamps
Where are Adobe's provided stamps?
I want to view this stamp's code
Copy link to clipboard
Copied
The document of the stamp.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Sir, That does not help.
I've been over that document multiple times.
It is for creating custom stamps.
I want to look at the code associated with one of the ADOBE STAMPS, not a custom stamp.
These come standard with Adobe Acrobat Pro DC
These work perfectly so I want to see their code.
Is it possible to do this?
Copy link to clipboard
Copied
app.getPath ("app", "stamps");
This will give you the path where the documents with the stamps are stored.
Copy link to clipboard
Copied
For someone else's future reference:
The standard ADOBE stamps are located here:
C:\Program Files (x86)\Adobe\Acrobat DC\Acrobat\plug_ins\Annotations\Stamps\ENU
Thanks
Copy link to clipboard
Copied
Hello CadRat,
Would you be able to tell me the code you found for the dynamic stamps with "By" and the timestamp indicated? Somehow I managed to change the user/login/identity to read "Print Stamp" (when I thought I was just changing the name of the stamp itself. Since the default code for all 3 changed, I don't know the correct code to change it back. Any help anyone could provide would be greatly appreciated.
(In other words, now the 3 stamps now reads By Print Stamp at 2:33 pm, October 6, 2020. I want to change themback to original default.)
Copy link to clipboard
Copied
This is the original code in those stamps:
event.value = (new Date()).toString();
AFDate_FormatEx("h:MM tt, mmm dd, yyyy");
event.value = "By " + ((!identity.name || identity.loginName != (event.source.source || this).Collab.user) ? (event.source.source || this).Collab.user : identity.name)
+ " at " + event.value;
Copy link to clipboard
Copied
Thank you for your quick response! Unfortunately the code you reference above is the same as what I saw, so I had IT uninstall/reinstall this morning and all is well. I was hoping to avoid being a PITA to IT, I guess no good deed goes unpunished! Thanks again!
Copy link to clipboard
Copied
Change identity back and future documents will follow.
If you've already made documents with these stamps, it's too late to look for JavaScript, the job was done.
Copy link to clipboard
Copied
Thank you - but I had IT uninstall/reinstall this morning. That fixed it!
Copy link to clipboard
Copied
I have created a dynamic stamp and it does work perfectly. What I am trying to do now is instead of the script asking for the user to enter thier last name, I want it to perform the digital certificate signature, just as if they had a signature feild (click, and sign).
Here is the code I currently use in the "By" field:
var cAsk = "Enter Last Name";
var cTitle = "Document State For Stamp";
if(event.source.forReal &&
(event.source.stampName == "#stamp1"))
{
event.value = app.response(cAsk, cTitle);
}
Copy link to clipboard
Copied
That's not going to work, as the stamp is flattened when you apply it, so the Signature field will just convert to a static image, not a real Digital Signature.