0 Replies Latest reply on Jan 26, 2015 1:18 PM by alkhemist

    How does one read Digital Certificate attributes/values?


      The plan:

      Distribute a document secured by "Certificate Security".  For those who have been granted the rights to print the document, need to be able to print the "User's Name" on the document - for traceability reasons.


      In before Acrobat XI (using Pro version), I was able do this with in a javascript  assigning "identity.name" and "identity.loginName" to arbitrary variable; then use addwatermarkfromtext function to display this data on each page.


      However with Acrobat XI, I see that identity.name and identity.loginName are Privileged and cannot be called from a page or document level script.  Furthermore addwatermarkfromtext is not supported in Reader (which the recipients are using). So my old tricks no longer work.


      I've over come the addwatermarkfromtext restriction inelegantly by using textboxes.


      The self-signed certificate I'm using allows for signing and execution of script; but not been successful in using the identity attributes - even with trying "app.trustedfunction... app.beginPriv() etc...


      In checking the API reference, see a possible work-around using the certificate properties - specially: certificate.subjectCN. The API reference shows this as a read-only, non-Privileged value!  Am at a loss on how to call/retrieve.  What I am hoping to do is: as the document is secured by Certificate, I want to read the Certificate's "common name" value of the person who opened the document and use this as my traceability token on printed documents.


      Would appreciate examples of JavaScript code to retrieve and use the Certificate.subjectCN of the user who has the document open.

      (or if I'm still barking up the wrong tree - direction to the right path).


      Many Thanks !