adobe-reader


Adobe folder level JS runs on Acrobat Pro DC but not allowed on Acrobat Reader DC


I have an use case where PDF form is downloaded from IIS / MVC, filled by end user and submitted back to server. After successful submit FDF response triggers document protection to disallow changes to document. Protection is activated by folder level javascript function:
function applySecurity()
{
var DoApplyMySecurity = app.trustedFunction( function(){
var oMyPolicy = null;
app.beginPriv();
// First, Get the ID of My Security Policy
var aPols = security.getSecurityPolicies()
for(var index=0;index<aPols.length;index++){
if(aPols[index].name == "AgreementPolicy"){
oMyPolicy = aPols[index]; break;
}
}
if(oMyPolicy == null){ app.alert("Policy Not Found"); return; }
// Now, Apply the security Policy
var rtn = this.encryptUsingPolicy({oPolicy: oMyPolicy });
if(rtn.errorCode != 0) app.alert("Security Error: " + rtn.errorText);
app.endPriv();
});
DoApplyMySecurity();
}
Document level function calls the above function as follows:
function valuesSaved(msg)
{
app.alert(msg);
applySecurity();
app.execMenuItem("Save");
app.execMenuItem("Close");
}
The problem is that when submitting the form using Acrobat Reader DC the following error occurs:
NotAllowedError: Security settings prevent access to this property or method.
Security.getSecurityPolicies:7:Doc undefined:Exec
When using Acrobat Pro DC security is applied successfully.
I have exported security settings from Pro DC to Reader DC.
What I am missing here?
I think this is the intention - Reader verion cannot by default save changed PDF

Related Links

How do i create macroses for paging up and paging down in Adobe Reader?
Adobe folder level JS runs on Acrobat Pro DC but not allowed on Acrobat Reader DC
Adobe Reader read loud in not working on my Linux [closed]
renaming an app's package or Activity name?
Acrobat PDF Reader add-on for IE not loading for specific URLs
PDF created in Adobe LiveCycle Designer does not open
Detect outdated versions of adobe reader?

Categories

HOME
rust
nam
knockout.js
mod-rewrite
enums
systemd
plaid
vsts-build
android-emulator
websocket
angular2-template
tweepy
tup
reportviewer
fasm
phpstorm-2017.1
squid
xbox360
async-await
phonegap-build
l20n
google-sites
office-ui-fabric
jaspersoft-studio
spam
akka-persistence
bsd
backtracking
sipp
firemonkey-style
environment
tortoisehg
boolean-logic
materialize
dnsmasq
tilemill
intune
toad
progid
steam-web-api
commonsware-cwac
nest
autoencoder
keyboard-layout
runtimeexception
unification
hypothesis-test
httphandler
adblock
viewmodel
aws-kinesis-firehose
node-apn
iptv
android-sharing
sequence-diagram
oracle-fusion-apps
ternary-operator
traversable
dpkg
jtag
maven-release-plugin
bbc-micro
teamviewer
trust
wikimedia-commons
wepay
phpquery
decidable
chicagoboss
cfwheels
android-studio-import
netdatacontractserializer
fantom
console.log
mutators
fiware-bosun
jcheckbox
comctl32
string.format
password-recovery
inputbox
communicate
neo4jphp
commenting
sqlbindparameter
xmi
cpu-time
lync-2010
code39
boinc
mute
sql-view
acceptance-testing
void-pointers
spiral
cmath
contextswitchdeadlock
red-system
simplecov
xalan
clrprofiler
telerik-ajax
django-apps
nsrangeexception
space-partitioning
css-friendly
mongrel2
suphp
downgrade
cassini
ixmldomdocument
aspbutton
bucket
source-code-protection
rtti
ntruencrypt
ning
jboss-mdb

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App