Take a survey

Developing Applications Using APIs > Converting Between File Formats and PDF > Converting PDF Documents to Non-image Formats > Converting PDF to a non-image format using the web service API

Converting PDF to a non-image format using the web service API
To convert a PDF document to a non-image format using the Generate PDF service client web service API, perform the following tasks:
1.
2.
Create a GeneratePDFServiceServiceWse object by using your proxy class’ constructor.
3.
Invoke the GeneratePDFServiceServiceWse object’s ExportPDF method and pass the following values:
A BLOB object that represents the file to be converted. Note that it must refer to a DIME attachment.
A java.lang.String object that contains the settings to be applied to the generated PDF document.
An optional BLOB object containing settings to be applied while generating the PDF document.
The ExportPDF method returns a mapItem[] object (shown as the createPDFResults variable in the steps below) that contains the new PDF document and log file. To obtain the newly created PDF document, perform the following actions:
Retrieve the new PDF document attachment identifier by iterating through the mapItem[] object and searching for the "ConvertedDoc" key in the mapItem[] object. Then cast that array member’s value to a BLOB.
Using the previously retrieved PDF document attachment identifier, extract the binary data representing the PDF document by accessing the DIME attachment in the GeneratePDFServiceService object’s ResponseSoapContext.Attachments property. This property contains a Stream that you can write out to a PDF file. The following example contains a custom method called copyStream that helps you extract the attachment’s stream to a stream that is written out to disk.
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/generatePdfJavaAndWSConversionsFromPDF.68.4.html