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

How can i have a user name in dynamic stamp?

kroitubo
Registered: Apr 22 2010
Posts: 2

Please help me on this problem. I'd created successfully the dynamic stamp in Acrobat 9.0. However, only the time and day are displayed but not the computer user name.

Here is the JS code:
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;

Please help to review and give me some advices. Thanks a lot

My Product Information:
Acrobat Pro 9.3.1, Windows
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4307
Do you have any errors in the Acrobat JavaScript debugging console?

Have you looked at the Acrobat JavaScript JS API Reference?

I know that use of the 'identity' object has security restrictions. From the Acrobat JS API Reference:

Quote:
[color=#FF0000]Note:[/color]The identity object properties are only accessible during batch, console and application initialization events to protect the privacy of the user. See “Privileged versus non-privileged context” on page 32 for details
You will need to create an Acrobat application folder level script that uses the 'Privileged' context to access the 'identity' object and capture the data.

See [url=http://www.acrobatusers.com/forums/aucbb/viewtopic.php?id=18384]How to Capture UserID and Add to Form[/url]. The provided code will work with Acrobat forms and comments and LiveCycle Designer forms.

George Kaiser