|
|
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. 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).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.
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/assemblePDFDocument_properties.101.7.html