Stamp: display of the AD displayName

Forum for the PDF-XChange Editor - Free and Licensed Versions

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Paul - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

spkmark
User
Posts: 7
Joined: Wed Mar 16, 2022 2:09 pm

Stamp: display of the AD displayName

Post by spkmark »

I need to display the AD field "DisplayName" (not Name!) for a dynamic stamp.

This works: event.value = identity.loginName OR event.value = identity.Name (all fields in the Identity Tab). But I need the "DisplayName".
Do you know a solution? Thanks a lot!
User avatar
Paul - PDF-XChange
Site Admin
Posts: 7378
Joined: Wed Mar 25, 2009 10:37 pm

Re: Stamp: display of the AD displayName

Post by Paul - PDF-XChange »

Hi spkmark,

identity.name is the right one. It should be pulling your AD "Display Name":

image.png
and from AD:
image.png
and the same in the JS console.:
image2.png
I assume you are seeing something different?
You do not have the required permissions to view the files attached to this post.
Best regards

Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
spkmark
User
Posts: 7
Joined: Wed Mar 16, 2022 2:09 pm

Re: Stamp: display of the AD displayName

Post by spkmark »

Unfortunately identity.name does not give me the display name. Our AD:
AD_1.PNG
AD_2.PNG
Here you can see that there is an employee number in the name, login name and username. Only in the field "DisplayName" is the name in plain text.
xchange_identity.PNG
In the XChange Identity I have only the employee number in the name. The AD field "Display Name" does not exist here. The call of "Identity.name" returns the employee number.
Is there any way to access the AD field Display Name via the PDF XChange?
You do not have the required permissions to view the files attached to this post.
User avatar
Paul - PDF-XChange
Site Admin
Posts: 7378
Joined: Wed Mar 25, 2009 10:37 pm

Re: Stamp: display of the AD displayName

Post by Paul - PDF-XChange »

Thanks for that spkmark,

I am going to have to consult the devs on this to see why it may be pulling the wrong thing. That is German language used, correct? I wonder if that might be influencing what we get.

I'll post here what they say.
Best regards

Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3586
Joined: Thu Jul 08, 2004 10:36 pm

Re: Stamp: display of the AD displayName

Post by Ivan - Tracker Software »

displayName is not available via identity.
But there are firstName and lastName.
PDF-XChange Co Ltd. (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
spkmark
User
Posts: 7
Joined: Wed Mar 16, 2022 2:09 pm

Re: Stamp: display of the AD displayName

Post by spkmark »

Works well and is a solution for us. Thanks a lot!
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19913
Joined: Mon Jan 12, 2009 8:07 am

Stamp: display of the AD displayName

Post by Stefan - PDF-XChange »

:)
dirk.ott
User
Posts: 7
Joined: Thu May 11, 2023 11:40 am

Re: Stamp: display of the AD displayName

Post by dirk.ott »

Hi together,
2023-05-11 13_50_29-Preferences.png
i´m trying to get the "attribute" for the the "Organization Name".
I got all other attributes:
event.value = identity.name;
event.value = identity.title;
event.value = identity.department;
event.value = identity.email;
event.value = identity.loginName;

Could you please be so kind and give me the value for "Organization Name"?

Best regards
Dirk
You do not have the required permissions to view the files attached to this post.
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19913
Joined: Mon Jan 12, 2009 8:07 am

Re: Stamp: display of the AD displayName

Post by Stefan - PDF-XChange »

Hello dirk.ott,

You can get the Organisation Name using the the identity.corporation.

Kind regards,
Stefan
dirk.ott
User
Posts: 7
Joined: Thu May 11, 2023 11:40 am

Re: Stamp: display of the AD displayName

Post by dirk.ott »

Hi Stefan,

thank you so much!!

Best regards
Dirk
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19913
Joined: Mon Jan 12, 2009 8:07 am

Stamp: display of the AD displayName

Post by Stefan - PDF-XChange »

:)
paul-mm
User
Posts: 3
Joined: Tue Jul 08, 2025 12:16 pm

Re: Stamp: display of the AD displayName

Post by paul-mm »

Paul - PDF-XChange wrote: Wed Mar 16, 2022 4:03 pm Hi spkmark,

identity.name is the right one. It should be pulling your AD "Display Name":
Hi Paul, I agree with your initial post that PDF-XChange should be using AD's displayName attribute. canonicalName, name and distinguishedName all are part of the path defining technically where the object sits within AD's structure. The displayName, on the other hand, although defaulting to the same as givenName+surname, it can be changed to something different - more importantly, it is the displayName that other Microsoft products use, such as Teams and Outlook.

Would it be possible to have PDF-XChange to align with Microsoft and also use displayName from AD?
User avatar
Daniel - PDF-XChange
Site Admin
Posts: 11385
Joined: Wed Jan 03, 2018 6:52 pm

Re: Stamp: display of the AD displayName

Post by Daniel - PDF-XChange »

Hello, paul-mm

Unfortunately Ivan has already confirmed that is not possible:
Ivan - Tracker Software wrote: Thu Mar 17, 2022 5:56 pm displayName is not available via identity.
But there are firstName and lastName.
Kind regards,
Dan McIntyre - Support Technician
PDF-XChange Co. LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
paul-mm
User
Posts: 3
Joined: Tue Jul 08, 2025 12:16 pm

Re: Stamp: display of the AD displayName

Post by paul-mm »

Hi Daniel, Yes I was aware of Ivan's response - what I am suggesting is that it would be a useful enhancement to have PDF-XChange work in the same manner as other Microsoft products and for the identity object to surface the displayName AD attribute. Concatenating firstName and lastName does not necessarily result in the same value as held by AD in displayName.
User avatar
Daniel - PDF-XChange
Site Admin
Posts: 11385
Joined: Wed Jan 03, 2018 6:52 pm

Re: Stamp: display of the AD displayName

Post by Daniel - PDF-XChange »

Hello, paul-mm

My apologies, I am fairly certain that Ivan was conveying it is not possible for us to make such a change with his prior statement. I can pass it along again to double check, but I cannot promise any changes at this point in time.

Kind regards,
Dan McIntyre - Support Technician
PDF-XChange Co. LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
paul-mm
User
Posts: 3
Joined: Tue Jul 08, 2025 12:16 pm

Re: Stamp: display of the AD displayName

Post by paul-mm »

Thanks for double checking 👍🏻

To expand on why "cn" field isn't ideal/correct: if there are two Joe Bloggs in the same OU, they cannot have the same "cn" value, as this produces the same distinguishedName path which must be unique. For that reason, we append the employee number to the "cn" field, but it's not ideal for that to appear in eg PDF comments. We also have "Surname, FirstName StaffNumber" as the "cn" so accounts are quicker to find in alphabetical order within AD itself, but the displayName is, for the most part, "FirstName Surname".

I say "for the most part" because there are instances where the employee may request their name to display differently or it is helpful to differentiate Joe Bloggs the CEO from Joe Bloggs the Apprentice, to help avoid contacting the wrong person! So for this, displayName is updated, not firstName or LastName.

I hope that helps provide some context :-)
User avatar
Daniel - PDF-XChange
Site Admin
Posts: 11385
Joined: Wed Jan 03, 2018 6:52 pm

Re: Stamp: display of the AD displayName

Post by Daniel - PDF-XChange »

Hello, paul-mm

indeed, having some context is helpful, this use case is about as expected. If I hear good news I will be sure to come back and let you know.

Kind regards,
Dan McIntyre - Support Technician
PDF-XChange Co. LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com