13
Rights-Enabled PDF Files
Writing Acrobat JavaScript for Reader
// Encrypt the document for the intended recipients:
this.encryptForRecipients({
oGroups:[importantGroup, otherGroup],
bMetaData: true
});
If a document is rights-enabled but commenting is not allowed, then the JavaScript
methods shown below in
Table 13.4
will be disabled:
T
ABLE
13.4
When Commenting is Not Allowed in Reader-Enabled Documents
Feature
Add a comment
Import comments
Export comments
Method
doc.addAnnot
doc.importAnFDF
doc.exportAsFDF
(when
bAnnotations
is set to
true
)
If a document is rights-enabled but file attachments are not allowed, then the following
JavaScript methods will be disabled:
●
●
●
●
doc.createDataObject
doc.importDataObject
doc.setDataObjectContents
doc.removeDataObject
If a document is rights-enabled but digital signatures are not allowed, then the following
JavaScript methods will be disabled:
●
●
●
●
doc.getField
(for signature fields)
doc.addField
(when
cFieldType = "signature"
)
field.removeField
(when
cFieldType = "signature"
)
field.signatureSign
232
Acrobat JavaScript Scripting Guide