Hello,
I am trying to create a dynamic stamp with the initials of the person stamping along with the date in the format mm/dd.
I have successfully modified the code from a current dynamic stamp and have the result of: bs5555 11/30
I want the result to be: BS 11/30
I want to deploy this to multiple users so the initials will change. Below is my current code:
event.value = (new Date()).toString();
AFDate_FormatEx(" mm/dd");
event.value = (identity.corporation || (event.source.source || this).Collab.user)
+ event.value;
Thank you for any direction you can provide. I have very little experience with Java code! I am creating in Acrobat 9 Pro but want to deploy to users with Acrobat 8 Standard.
Brandyn
Here's some code that uses a regular expression to extract all the first letters from the name parameter
event.value = identity.name.match(/^\w|\W\w/g).join("").replace(/\W/g,"").toUpperCase() + util.printd(" mm/dd",new Date());
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script