• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Dynamic Stamp with Username

New Here ,
Dec 20, 2018 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

11.8K

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
community guidelines
Community Expert ,
Dec 20, 2018 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?

Votes

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
community guidelines
Community Expert ,
Dec 20, 2018 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;

Votes

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
community guidelines
New Here ,
Dec 20, 2018 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

Votes

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
community guidelines
Community Expert ,
Dec 20, 2018 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.

Votes

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
community guidelines
New Here ,
Dec 20, 2018 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?

Votes

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
community guidelines
Community Expert ,
Dec 21, 2018 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.

Votes

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
community guidelines
New Here ,
Jan 03, 2019 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!

Votes

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
community guidelines
Community Expert ,
Jan 04, 2019 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.

Votes

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
community guidelines
New Here ,
Jul 29, 2020 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.

Votes

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
community guidelines
New Here ,
May 26, 2023 May 26, 2023

Copy link to clipboard

Copied

LATEST

@magnusm27477433 Mark.Thomas.FIN@gric.nsn.us 

The below code worked for me and my team. Code courtesy of a popular chatbot.

 

var userName = identity.name;

var formattedDateTime = util.printd("h:MM tt, mmm dd yyyy", new Date);
var displayText = "By " + userName + " on " + formattedDateTime;

event.value = displayText;

Votes

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
community guidelines