Highlighted

Dynamic Stamp with Username

New Here ,
Dec 20, 2018

Copy link to clipboard

Copied

Hello,

i try to create a dynamic stamp which shows the Date and the Username of the Current User or the signature.

Acrobat does have a stamp like this in the examples, but i can't change them. I know that this is only possible with a calculated java-script.

The date i get with this code:

Event.value = util.printd("h:MM tt, MMM dd yyyy", New Date);

But i can't find any solution for a username (embedded in this and i don't know any java-script-specialist.

I hope you can help me.

Thanks and have  some nice christmas days!

Views

3.7K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Dynamic Stamp with Username

New Here ,
Dec 20, 2018

Copy link to clipboard

Copied

Hello,

i try to create a dynamic stamp which shows the Date and the Username of the Current User or the signature.

Acrobat does have a stamp like this in the examples, but i can't change them. I know that this is only possible with a calculated java-script.

The date i get with this code:

Event.value = util.printd("h:MM tt, MMM dd yyyy", New Date);

But i can't find any solution for a username (embedded in this and i don't know any java-script-specialist.

I hope you can help me.

Thanks and have  some nice christmas days!

Views

3.7K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Most Valuable Participant ,
Dec 20, 2018

Copy link to clipboard

Copied

First of all, your code for the date is not correct. You've added capital letters when you shouldn't have.

Do you want to include the username in the same field as the date, or separately?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Most Valuable Participant ,
Dec 20, 2018

Copy link to clipboard

Copied

You should copy the code from one of the built-in dynamic stamps. For example:

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;

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
New Here ,
Dec 20, 2018

Copy link to clipboard

Copied

Thanks - where did you get the "original Code" from the built-in stamps? I did not find them, although nothing with Google (maybe because i searched in german, because we are in Germany)

But this code doesn't Show the Username:

2018-12-20 18_18_16-IBM Notes Antwort_ WG_ Re_ [Acrobat Reader] – Dynamic Stamp with Username [Viren.jpg

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Most Valuable Participant ,
Dec 20, 2018

Copy link to clipboard

Copied

I went to the Stamps folder of the application (the exact location depends on your OS and Acrobat version), then opened the Dynamic.pdf file and copied the calculation script from one of the stamps that has the user name in it.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
New Here ,
Dec 20, 2018

Copy link to clipboard

Copied

Even if i copy a built-in stamp and create a new one with the same code, it

doesn't work.

Can you try this with your System, too?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Most Valuable Participant ,
Dec 21, 2018

Copy link to clipboard

Copied

There might be an error when you apply the code to the field, but when you apply the actual stamp it will work. I tested it myself and it worked fine.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
New Here ,
Jan 03, 2019

Copy link to clipboard

Copied

Happy new year!

We tried it again with the original stamps and it doesn't work even if we

change nothing.

We open the original stamp in Acrobat in Acrobat Professional it looks like

this:

(foozle is not our username)

If we go to the Code, go to edit menu to see the code and apply without any

changes, the stamp looks like this:

We change nothing and it doesnt work.... if we use the original stamps, the

username is always displayed.

The original code is:

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;

Can we change anything to make it work? May there be a problem with Adobe

Versions? Maybe with the installed language?

I have no idea....is there maybe a special support user / contact for such

a problem? Maybe someone can use teamviewer to see what happens in our

system?

Thanks a lot for your support!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Most Valuable Participant ,
Jan 04, 2019

Copy link to clipboard

Copied

I might be able to offer you such help privately, for a fee. If you're interested you can contact me via try6767 at gmail.com. Just to clarify, though, I'm not an Adobe employee.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
New Here ,
Jul 29, 2020

Copy link to clipboard

Copied

I used the code and it show the time and date but doesn't show my identity. Help if you can. Thanks.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Resources
Trending Issue & Solution
Edit PDF in Adobe Acrobat Pro DC