You can invoke the EncryptDocument service (which was built in Workbench ES) using a .NET client assembly that uses data over HTTP. (See Invoking LiveCycle ES Using Web Services.)
1.
2. Using the Microsoft .NET client assembly, create an EncryptDocumentService object by invoking its default constructor.
3. Set the EncryptDocumentService object’s Credentials property with a System.Net.NetworkCredential object. Within the System.Net.NetworkCredential constructor, specify a LiveCycle ES user name and the corresponding password. You must set authentication values to enable your .NET client application to successfully exchange SOAP messages with LiveCycle ES.
4. Create a BLOB object by using its constructor. The BLOB object is used to pass data to the EncryptDocument process.
5. Assign a string value to the BLOB object’s remoteURL data member that specifies the URI location of a PDF document to pass to the EncryptDocument service.
6. Invoke the EncryptDocument process by invoking the EncryptDocumentService object’s invoke method and passing the BLOB object. This process returns an encrypted PDF document within a BLOB object.
7. Create a System.UriBuilder object by using its constructor and passing the value of the returned BLOB object’s remoteURL data member.
8. Convert the System.UriBuilder object to a System.IO.Stream object. (The C# Quick Start that follows this list illustrates how to perform this task.)
9. Create a byte array and populate it with the data located in the System.IO.Stream object.
10. Create a System.IO.BinaryWriter object by invoking its constructor and passing the System.IO.FileStream object.
11. Write the byte array contents to a PDF file by invoking the System.IO.BinaryWriter object’s Write method and passing the byte array.
| Programming with LiveCycle ES (LiveDocs) |
| Adobe LiveCycle ES Update 1 |
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/help/000280_3.html