Review, Markup, and Approval
Online Collaboration Essentials
7
The following code allows full and unrestricted access to the entire document for one set of
users (
importantUsers
), and allows high quality printing for another set of users
(
otherUsers
):
var sh = security.getHandler("Adobe.PPKMS");
var dir = sh.directories[0];
var dc = dir.connect();
dc.setOutputFields({oFields:["certificates"]});
var importantUsers = dc.search({oParams:{lastName:"Smith"}});
var otherUsers = dc.search({oParams:{lastName:"Jones"}});
this.encryptForRecipients({
oGroups:[
{
oCerts: importantUsers,
oPermissions: { allowAll: true }
},
{
oCerts: otherUsers,
oPermissions: { allowPrinting: "highQuality" }
}
],
bMetaData: true
});
Emailing PDF Documents
In addition to the
Email
options available in the Acrobat menu and toolbar, it is also
possible to use Acrobat JavaScript to set up an automated email review workflow. This may
be done through the
doc
object’s
mailDoc
method. In the code shown below, the
document is automatically sent to
recipient@adobe.com:
this.mailDoc(
false,
"recipient@adobe.com", "", "",
"Review",
"Please review this document and return. Thank you."
);
N
OTE
:
For Windows systems, the default mail program must be MAPI-enabled.
Acrobat JavaScript Scripting Guide
125