Take a survey

Developing Applications Using APIs > Assigning Usage Rights > Applying Usage Rights to PDF Documents > Applying using rights using LiveCycle Remoting

Applying using rights using LiveCycle Remoting
To apply usage rights to a PDF document using LiveCycle Remoting, perform the following tasks:
1.
Include the files that enable you to perform remoting. For information, see Invoking LiveCycle ES Using LiveCycle Remoting.
2.
With LiveCycle Remoting, you do this by creating a dynamic ChannelSet instance that uses the AMF channel.
3.
Create a new flash.net.FileReference instance.
Create FileReference event handlers for the Event.SELECT and DataEvent.UPLOAD_COMPLETE_DATA events.
Call the FileReference.browse method to display a file selection dialog box.
In the select event handler, create a flash.net.URLRequest instance that specifies the URL of the server script configured to handle upload through HTTP POST calls. For LiveCycle Remoting, this is http://lcserver:port/remoting/lcfileupload. Then call the FileReferences.upload method.
In the upload complete event, populate DocumentReference instance and call a method that applies usage rights, as explained in the next step.
4.
Create a UsageRights object that represents usage rights by using its constructor.
For each usage right to apply, assign the value true to the corresponding data member that belongs to the UsageRights object. For example, to add the enableFormFillIn usage right, assign true to the UsageRights object’s enableFormFillIn data member. (Repeat this step for each usage right to apply).
5.
Create a ReaderExtensionsOptionSpec object by using its constructor. This object contains run-time options that are required by the Reader Extensions service.
Assign the UsageRights object to the ReaderExtensionsOptionSpec object’s usageRights data member.
Assign a string value that specifies the message that a user sees when the rights-enabled PDF document is opened in Adobe Reader to the ReaderExtensionsOptionSpec object’s message data member.
Apply usage rights to the PDF document by invoking the ReaderExtensionsServiceService object’s applyUsageRights method and passing the following values:
The Object object that contains the ReaderExtensionsOptionSpec that contains the PDF document to which usage rights is applied.
The ReaderExtensionsOptionSpec object that contains run-time options.
The applyUsageRights method returns an Object object that contains the rights-enabled PDF document.
6.
View Quick Start
 

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/livecycle/es/sdkHelp/programmer/sdkHelp/usageRightsApplyUageRights.57.5.html