Expand my Community achievements bar.

SOLVED

Checking if PDF is Reader Extended

Avatar

Level 1

I'm trying to have a form automatically check to see if it is reader extended whenever it is saved and issue a warning if it's not. 

This form allows for a user to fill it and then multiple users to sign off on the content.  All of the users filling it have Adobe Acrobat Pro, and some of them may wish to add attachments, but many of the people signing it only have Reader.  The procedure we are using for this is to have the save a copy of the original, Reader Extended, form, add their attachments, and then save it again as Reader Extended. 

I do not have server-side access, so I can't use Reader Extensions to enable attachments.  The form needs to be dynamic, so I also can't use the "comments" work around.

Any ideas on how to check if a form is reader extended in JavaScript would be much appreciated!

Thanks!

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

If you have a look at this post, including the comments/screenshots, it explains how to test if the form is Reader Enabled in the JavaScript Console: http://assure.ly/etkFNU.

I have tried this in a button click event:

var oDoc = event.target;

var vTest = oDoc.appRightsValidate({}, 2, true);

if (vTest == "undefined") {

          app.alert("Form is not Reader Enabled!");

}

But it fails, as Adobe's security policy prevents access to that method. Therefore you would need to run it within a privileged context, which would require a trusted function. These can be troublesome to deploy and maintain, depending on your environment. For example, for the method to work the trusted function (in a JavaScript file) would have to be installed on every user's computer.

A search on this forum for trusted functions will bring up plenty of examples.

So while you can test within the JavaScript console, to test automatically will require a trusted function.

Good luck,

Niall

View solution in original post

3 Replies

Avatar

Correct answer by
Level 10

Hi,

If you have a look at this post, including the comments/screenshots, it explains how to test if the form is Reader Enabled in the JavaScript Console: http://assure.ly/etkFNU.

I have tried this in a button click event:

var oDoc = event.target;

var vTest = oDoc.appRightsValidate({}, 2, true);

if (vTest == "undefined") {

          app.alert("Form is not Reader Enabled!");

}

But it fails, as Adobe's security policy prevents access to that method. Therefore you would need to run it within a privileged context, which would require a trusted function. These can be troublesome to deploy and maintain, depending on your environment. For example, for the method to work the trusted function (in a JavaScript file) would have to be installed on every user's computer.

A search on this forum for trusted functions will bring up plenty of examples.

So while you can test within the JavaScript console, to test automatically will require a trusted function.

Good luck,

Niall

Avatar

Level 1

Thanks for your quick response, Niall! 

Unfortunately, I can't use trusted functions, so it sounds like I'll have to go without this capability. 

Avatar

Level 10

Hi,

if possible for you, you can use my folder level script for your Acrobat.

http://thelivecycle.blogspot.de/2011/07/check-files-for-usage-rights.html

You only need to copy the js-file into the JavaScripts folder under your user account.

Until Acrobat 10.1.0

C:\Users\<username>\AppData\Roaming\Adobe\Acrobat\10.0\JavaScripts

From Acrobat 10.1.1

C:\Users\<username>\AppData\Roaming\Adobe\Acrobat\Privileged\10.0\JavaScripts