Performing Service Operations Using APIs > Assembling PDF Documents > Assembling Non-Interactive PDF Documents

Assembling Non-Interactive PDF Documents
You can assemble a non-interactive PDF document when using an interactive PDF form as input. That is, assume that you have a form that users can use to enter data into its fields. You can pass that form to the Assembler service, resulting in the Assembler service returning a PDF document that prevents users from entering data into its fields. This document is a non-interactive PDF form. For example, the following illustration shows a mortgage application that represents an interactive form.
For the purpose of this discussion, assume that the following DDX document is used.
<?xml version="1.0" encoding="UTF-8"?>
<DDX xmlns="http://ns.adobe.com/DDX/1.0/">
  <PDF result="out.pdf">
    <PDF source="inDoc"/>
    <NoXFA/>
  </PDF>
</DDX>
Within this DDX document, notice that the source attribute is assigned the value inDoc. In situations where only one input PDF document is passed to the Assembler service and one PDF document is returned, and you invoke the invokeOneDocument operation, assign the value inDoc to the PDF source attribute. When invoking the invokeOneDocument operation, the inDoc value is a predefined key that must be specified in the DDX document.
In contrast, when passing two or more input PDF documents to the Assembler service, you can invoke the invokeDDX operation. In this situation, assign the file name of the input PDF document to the source attribute.
This DDX document contains the NoXFA element, which instructs the Assembler service to return a non-interactive PDF document.
Note: The Assembler service can assemble non-interactive PDF documents without the Output service being part of your LiveCycle ES installation if the input PDF document is based on an Acrobat form or a static XFA form. However, if the input PDF document is a dynamic XFA form, the Output service must be part of your LiveCycle ES installation. If the Output service is not part of your LiveCycle ES installation when a dynamic XFA form is assembled, an exception is thrown. (See About the Output Service.)
Tip: Before reading this section, it is recommended that you be familiar with assembling PDF documents using the Assembler service. This section does not discuss concepts, such as creating a collection object that contains input documents or learning how to extract the results from the returned collection object. (See Programmatically Assembling PDF Documents.)
Note: For more information about the Assembler service, see LiveCycle ES Services.
Note: For more information about a DDX document, see DDX Reference.
Summary of steps
To assemble a non-interactive PDF document, perform the following tasks:
1.
2.
3.
4.
5.
6.
7.
Include project files
Include the necessary files in your development project. If you are creating a client application by using Java, include the necessary JAR files. If you are using web services, ensure that you include the proxy files.
The following JAR files must be added to your project’s class path:
If LiveCycle ES is deployed on a supported J2EE application server other thanJBoss, you must replace the adobe-utilities.jar and jbossall-client.jar files with JAR files that are specific to the J2EE application server that LiveCycle ES is deployed on. For information about the location of all LiveCycle ES JAR files, see Including LiveCycle ES Java library files.
Create a PDF Assembler client
Before you can programmatically perform an Assembler operation, you must create an Assembler service client.
Reference an existing DDX document
A DDX document must be referenced to assemble a PDF document. This DDX document must contain the NoXFA element, which instructs the Assembler service to return a non-interactive PDF document.
Reference an interactive PDF document
An interactive PDF document must be referenced and passed to the Assembler service to get back a non-interactive PDF document.
Set run-time options
You can set run-time options that control the behavior of the Assembler service while it performs a job. For example, you can set an option that instructs the Assembler service to continue processing a job if an error is encountered. For information about the run-time options that you can set, see the AssemblerOptionSpec class reference in LiveCycle ES API References.
Assemble the PDF document
After you create the Assembler service client, reference the DDX document, reference an interactive PDF document, and set run-time options, you can invoke the invokeOneDocument operation. Because only one input PDF document is passed to the Assembler service and a single document is returned, you can use the invokeOneDocument operation as opposed to the invokeDDX operation.
Save the non-interactive PDF document
If only a single PDF document is passed to the Assembler service, the Assembler service returns a single document instead of a collection object. That is, when invoking the invokeOneDocument operation, a single document is returned. Because the DDX document referenced in this section contains instructions to create a non-interactive PDF document, the Assembler service returns a non-interactive PDF document that can be saved as a PDF file.
 

Performing Service Operations Using APIs > Assembling PDF Documents > Assembling Non-Interactive PDF Documents

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/000611.html