The following web service code example modifies a watermark named Confidential by modifying the value of the opacity attribute to 80./** Ensure that you create a .NET client assembly that uses* base64 encoding. This is required to populate a BLOB* object with data or retrieve data from a BLOB object.** For information, see "Invoking LiveCycle ES using Base64 Encoding"* in Programming with LiveCycle ES*/using System;using System.Collections;using System.ComponentModel;using System.Data;using System.IO;namespace ModifyWatermarks{class Class1{[STAThread]static void Main(string[] args){try{//Create a RightsManagementServiceService objectRightsManagementServiceService rmClient = new RightsManagementServiceService();rmClient.Credentials = new System.Net.NetworkCredential("administrator", "password");//Retrieve the watermark named ConfidentialWatermarkSpec watermark = rmClient.getWatermarkByName("Confidential");//Define the key/value pairs required by the Rights Management serviceValueMapSpec valueMapSpec = new ValueMapSpec();valueMapSpec.key = "WaterBackCmd:IS_USERID_ENABLED";valueMapSpec.value = "true";//Set the text enabled propertyValueMapSpec valueMapSpec1 = new ValueMapSpec();valueMapSpec1.key = "WaterBackCmd:IS_CUSTOMTEXT_ENABLED";valueMapSpec1.value = "True";//Set the opacity propertyValueMapSpec valueMapSpec2 = new ValueMapSpec();valueMapSpec2.key = "WaterBackCmd:OPACITY";valueMapSpec2.value = ".80";//Set the text propertyValueMapSpec valueMapSpec3 = new ValueMapSpec();valueMapSpec3.key = "WaterBackCmd:SRCTEXT";valueMapSpec3.value = "Confidential";//Set the watermark propertiesObject[] myObject = new Object[4];myObject[0] = new Object();myObject[1] = new Object();myObject[2] = new Object();myObject[3] = new Object();myObject[0] = (Object)valueMapSpec;myObject[1] = (Object)valueMapSpec1;myObject[2] = (Object)valueMapSpec2;myObject[3] = (Object)valueMapSpec3;//Assign the object array to the values data memberwatermark.values = myObject;//Register the watermarkrmClient.updateWatermark(watermark);}catch (Exception ee){Console.WriteLine(ee.Message);}}}}
| 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/000149_3.html