Take a survey

Developing Applications Using APIs > Rendering Forms > Optimizing the Performance of the Forms Service > Optimizing performance using the web service API

Optimizing performance using the web service API
To render a form with optimized performance using the web service API, perform the following tasks:
1.
2.
Create a FormsService object and set authentication values. For information, see Creating Java proxy classes using Apache Axis.
3.
Create a PDFFormRenderSpec object by using its constructor.
Set the form cache option by invoking the PDFFormRenderSpec object’s setCacheEnabled method and passing true.
Set the standalone option by invoking the PDFFormRenderSpec object’s setStandAlone method and passing true.
Set the linearized option by invoking the PDFFormRenderSpec object’s setLinearizedPDF method and passing true.
4.
Invoke the FormsService object’s renderPDFForm method and pass the following values:
A string value that specifies the form design name, including the file name extension. If you are referencing a form design that is saved in the LiveCycle ES repository, ensure that you specify the / character before the file name.
A BLOB object that contains data to merge with the form. If you do not want to merge data, then pass null. For information, see Prepopulating Dynamic Forms.
A PDFFormRenderSpecc object that stores run-time options. For information about run-time options, see LiveCycle ES API References.
A URLSpec object that contains URI values that are required by the Forms service.
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.
An empty com.adobe.idp.services.holders.BLOBHolder object that is populated by the method. This is used to store the rendered PDF form.
An empty javax.xml.rpc.holders.LongHolder object that is populated by the method. (This argument will store the number of pages in the form).
An empty javax.xml.rpc.holders.StringHolder object that is populated by the method. (This argument will store the locale value).
An empty com.adobe.idp.services.holders.FormsResultHolder object that will contain the results of this operation.
The renderPDFForm method populates the com.adobe.idp.services.holders.FormsResultHolder object that is passed as the last argument value with a form data stream that must be written to the client web browser.
5.
Create a FormResult object by getting the value of the com.adobe.idp.services.holders.FormsResultHolder object’s value data member.
Create a javax.servlet.ServletOutputStream object used to send a form data stream to the client web browser.
Create a BLOB object that contains form data by invoking the FormsResult object’s getOutputContent method.
Create a byte array and populate it by invoking the BLOB object’s getBinaryData method. This task assigns the content of the FormsResult object to the byte array.
Invoke the javax.servlet.http.HttpServletResponse object’s write method to send the form data stream to the client web browser. Pass the byte array to the write method.
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/renderingPerformance.42.4.html