Skip to main content
Participant
January 4, 2021
Question

Add User name on PDF when print

  • January 4, 2021
  • 4 replies
  • 3264 views

I want to find the Java that will allow to add the user ID on the document when they print and a time stamp on the side. 

This topic has been closed for replies.

4 replies

try67
Community Expert
Community Expert
January 4, 2021

You can't access the login name of the user directly. It requires a special context, such as a script installed on the local machine. Is that something you can do for each user who is going to use this file?

Participant
January 4, 2021

I was thinking using this:

 

userName = identity.loginName;

 

Will that work? 

try67
Community Expert
Community Expert
January 4, 2021

No. It will yield this error message:

NotAllowedError: Security settings prevent access to this property or method.

Legend
January 4, 2021

No, JavaScript. Not Java Script. It's important: if you don't spell it exactly that way you won't find the right stuff in Google.

Participant
January 4, 2021

Correction Im looking for the Java Script

Bernd Alheit
Community Expert
Community Expert
January 4, 2021

Don't look for Java code. Acrobat uses Javascript.