View comments | RSS feed
Take a survey

Section A - DDX User Guide > Setting Other Document Properties > Working with forms > Flattening forms

Flattening forms
Flattening means that form fields retain their graphical appearance but are no longer interactive. For example, a check box still appears as a rectangle, but the user cannot click it to indicate a selection. In addition, scripts associated with the fields no longer function.
To flatten all form fields, you use the NoForms element as a child of a PDF or PDFGroup element. The flattening is performed for the specified scope. This is useful, for instance, if you want to assemble documents that contain XFA forms. If a non-base document contains XFA-based forms, an error is thrown when that document is aggregated with other documents. To avoid such an error, the NoForms element can be used to flatten all forms in the document (or the NoXFA element can be used to flatten all XFA-based forms in the document).
The Assembler service invokes the Output service (if it is available) to flatten XFA-based PDF documents. This utilizes the XFAConversionSettings element. (See XFAConversionSettings. )
In this example, any form fields in doc3.pdf are flattened. If doc2.pdf contains an Acrobat or XFA form, it is retained.
Example: Flattening forms
<PDF result="doc1.pdf">
	<PDF source="doc2.pdf"/>
	<PDF source="doc3.pdf" >
		<NoForms/>
	</PDF>
</PDF>
To flatten only XFA forms, you use the NoXFA element as a child of a PDF or PDFGroup element. If the documents in the scope of the NoXFA element do not have XFA forms, they are not modified.
The following example flattens XFA form fields in doc2.pdf in order to assemble it with doc1.pdf and returns the data as doc3.pdf.
Example: Flattening XFA forms
<PDF result="doc3.pdf">
	<PDF source="doc1.pdf"/>
	<PDF source="doc2.pdf">
		<NoXFA/>
	</PDF>
</PDF>
When the base document is an XFA form, you have the option of saving the result document in XDP format instead of PDF. XDP is an XML format that can contain PDF data as well as form data. To save a document as XDP, you set the format attribute to XDP as in this example.
Example: Saving an XFA form as XDP
<PDF result="doc3.pdf" format="XDP">
	<PDF source="doc1.pdf"/> <!--Base document; must be XFA form-->
	<PDF source="doc2.pdf"/>
</PDF>
Note: Be aware that flattening form fields may have side effects. For example, a document might contain JavaScript code that runs when the document is opened. If the JavaScript refers to a specific form field, and forms have been flattened, an error will occur.

Section A - DDX User Guide > Setting Other Document Properties > Working with forms > Flattening forms

Document Description XML (DDX) Help
LiveCycle ES Update 1

Comments


Kathy Stone said on Mar 4, 2009 at 1:41 PM :
The sentence that starts with "The Assembler service invokes the Output service ..." is slightly inaccurate. Here is a more accurate explanation:

The Assembler service uses the Output service to flatten dynamic XML forms. If the Output service is not available, then the Assembler service cannot flatten dynamic forms.

The Assembler service itself flattens static XML forms and Acrobat forms.
sp721 said on Jan 18, 2010 at 7:28 AM :
Thanks for your comment. I should have read before reading the rest of the article. Thanks Kathy.

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/livecycle/8.2/ddxRef/000675.html