Take a survey

Developing Applications Using APIs > Converting PDF to Postscript and Image Files > Converting PDF Documents to Image Formats > Converting a PDF document to image files using the web service API

Converting a PDF document to image files using the web service API
To convert a PDF document to an image format using the PDF Generator ES service client web service API, perform the following tasks:
1.
2.
Create a ConvertPDFServiceService object by using your proxy class’ constructor.
3.
Create a BLOB object by using its constructor. This BLOB object is used to store the PDF form.
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.
Populate the BLOB object by assigning its binaryData property with the contents of the byte array.
4.
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.
5.
Invoke the ConvertPDFServiceService object’s toImage method and pass the following values:
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.
6.
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.
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/convertPDFToImage.64.4.html