|
|
To convert a PDF document to an image format using the PDF Generator ES service client web service API, perform the following tasks:
•
• Create a ConvertPDFServiceService object by using your proxy class’ constructor.
•
• Create a System.IO.FileStream object by invoking its constructor and passing a string value that specifies the location of the PDF form and the mode in which to open the file.
• Create a byte array that stores the content of the System.IO.FileStream object. You can determine the size of the byte array by getting the System.IO.FileStream object’s Length property.
• Populate the byte array with stream data by invoking the System.IO.FileStream object’s Read method and passing the byte array, the starting position, and the stream length to read.
•
• Create a ToImageOptionsSpec object by using its constructor.
• Invoke methods that belong to this object as required. For example, you can set the image type by invoking the setImageConvertFormat method and passing an ImageConvertFormat enum value that specifies the format type. For information about ToImageOptionsSpec methods, see the LiveCycle ES API References.
• A BLOB object that represents the file to be converted.
• A ToImageOptionsSpec object that contains the various preferences about the target image format.The toImage method returns a BLOB object that contains a ZIP file containing the newly created image files.Invoke the ConvertPdfServiceService object’s unzipArchive method and specify the BLOB object containing the ZIP file as well as the target directory in which to place the image files.
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/convertPDFToImage.64.4.html