Include client JAR files, such as adobe-forms-client.jar, in your Java project’s class path. For information about the location of these files, see Including LiveCycle ES Java library files.
• Create a ServiceClientFactory object that contains connection properties. (See Setting connection properties.)
• Create an FormsServiceClient object by using its constructor and passing the ServiceClientFactory object.
• Create a java.io.FileInputStream object that represents the form design to render by using its constructor and passing a string value that specifies the location of the XDP file.
• Create a com.adobe.idp.Document object by using its constructor and passing the java.io.FileInputStream object.
•
• A com.adobe.idp.Document object that contains the form design. Normally this parameter value is reserved for data that is merged with the form.
• A PDFFormRenderSpec object that stores run-time options. This is an optional parameter and you can specify null if you do not want to specify run-time options. For more information, see LiveCycle ES Java API Reference.
• A URLSpec object that contains URI values that are required by the Forms ES service. (See Specify URI values.)
• A java.util.HashMap object that stores file attachments. This is an optional parameter and you can specify null if you do not want to attach files to the form. (See Attach files to the form.)The renderPDFForm method returns a FormsResult object that contains a form data stream that must be written to the client web browser.
• Create a com.adobe.idp.Document object by invoking the FormsResult object ‘s getOutputContent method.
•
• Set the javax.servlet.http.HttpServletResponse object’s content type by invoking its setContentType method and passing the content type of the com.adobe.idp.Document object.
• Create a javax.servlet.ServletOutputStream object used to write the form data stream to the client web browser by invoking the javax.servlet.http.HttpServletResponse object’s getOutputStream method.
• Create a java.io.InputStream object by invoking the com.adobe.idp.Document object’s getInputStream method.
• Create a byte array and allocate the size of the InputStream object. Invoke the InputStream object’s available method to obtain the size of the InputStream object.
• Populate the byte array with the form data stream by invoking the InputStream object’s read method and passing the byte array as an argument.
• Invoke the javax.servlet.ServletOutputStream object’s write method to send the form data stream to the client web browser. Pass the byte array to the write method.
| 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/000337_2.html