[AEM Forms]{class="badge positive" title="Applies to AEM Forms)."}

Generate a Submission PDF (formerly Document of Record) for Adaptive Forms

NOTE
Adobe recommends using the modern and extensible data capture Core Components for creating new Adaptive Forms or adding Adaptive Forms to AEM Sites pages. These components represent a significant advancement in Adaptive Forms creation, ensuring impressive user experiences. This article describes older approach to author Adaptive Forms using foundation components.
Version
Article link
AEM 6.5
Click here
AEM as a Cloud Service
This article

Overview overview

When a form is filled or submitted, you can keep a record of the form, in print or in document format. This record is called a Submission PDF (formerly Document of Record, or DoR). It is a print-friendly PDF of the submitted form. You can also refer to the Submission PDF for the information customers have filled at a later date or use the Submission PDF to archive forms and content together in PDF format.

Submission PDF (formerly Document of Record)

To create a Submission PDF, an XFA or Acroform based template is merged with data collected via an adaptive form. You can generate a Submission PDF automatically or on-demand.
The on-demand option lets you specify a custom XFA or Acroform based template to provide a custom appearance to your Submission PDF.

You can:

Before you start components-to-automatically-generate-a-document-of-record

Before you start learn and ready the assets required for a Submission PDF:

Base template: An XFA template (XDP file) created in Forms Designer or an Acrobat Form (AcroForm). Base template is used to specify styling and branding information for a Submission PDF. Upload your XFA template (XDP file) to your AEM Forms instance before

Adaptive Form: An Adaptive Form for which the Submission PDF is to be generated.

Generate an XFA-based Submission PDF generate-an-XFA-based-document-of-record

Upload your XFA template (XDP file) to your AEM Forms instance. Perform the following steps to configure an Adaptive Form to use XFA template (XDP file) as template for Submission PDF:

  1. In Experience Manager author instance, click Forms > Forms and Documents.
  2. Select a form, and click Properties.
  3. In the Properties window, select Form Model.
  4. On the Form Model tab, in the Select From drop-down, select Schema or None. You can also select a form model when you create a form.
  5. In the Document of Record Template Configuration section of the Form Model tab, select Associate Form Template as Document of Record Template. On selecting this option, all XFA template (XDP files) available on your machine are displayed. Select the appropriate file. Also, ensure same schema (data schema) is used for Adaptive Form and selected XFA template (XDP file).
  6. Click Done

Your Adaptive Form is now configured to use an XDP file as template for Submission PDF. The next step is to bind Adaptive Form components with corresponding template fields.

Generate an Acroform-based Submission PDF generate-an-Acroform-based-document-of-record

Upload your Adobe Acrobat PDF (Acroform) to your AEM Forms instance. Perform the following steps to configure an Adaptive Form to use Adobe Acrobat PDF (Acroform) as template for Submission PDF:

  1. In Experience Manager author instance, click Forms > Forms and Documents.
  2. Select a form, and click Properties.
  3. In the Properties window, select Form Model.
  4. On the Form Model tab, in the Select From drop-down, select Schema or None. You can also select a form model when you create a form.
  5. In the Document of Record Template Configuration section of the Form Model tab, select Associate Form Template as Document of Record Template. On selecting this option, all Acrobat PDF (Acroform) available on your machine are displayed. Select the appropriate file.
  6. Click Done

Your Adaptive Form is now configured to use an Acroform as template for Submission PDF. The next step is to bind Adaptive Form components with corresponding template fields.

Automatically generate a Submission PDF auto-generate-a-document-of-record

When an Adaptive Form is configured to automatically generate a Submission PDF, every time a form is changed, its Submission PDF is updated immediately. For example, if a field is removed from an existing adaptive form, the corresponding field is also removed and is not visible in the Submission PDF. There are many other advantages of automatically generating a Submission PDF:

  • Form developers do not have to maintain data bindings manually. Auto-generated Submission PDF takes care of data binding related updates.
  • Form developers do not have to manually hide fields which are marked exclude from Submission PDF. Auto-generated Submission PDF are pre-configured to exclude such fields.
  • Auto-generated Submission PDF option saves time required to create a Form template for Submission PDF.
  • Auto-generated Submission PDF option lets you use different styling and appearances using different base templates. It helps select best style and appearance for Submission PDF for your organization. If you do not specify styling, system styles are set as default.
  • Auto-generated Submission PDF ensures any change in form is immediately reflected in Submission PDF.

Perform the following steps to configure an Adaptive Form to automatically generate a Submission PDF:

  1. In Experience Manager author instance, click Forms > Forms and Documents.
  2. Select a form, and click Properties.
  3. In the Properties window, select Form Model.
  4. On the Form Model tab, in the Select From drop-down, select Schema or None. You can also select a form model when you create a form.
  5. In the Document of Record Template Configuration section of the Form Model tab, select Generate Document of Record.
  6. Click Done

Bind Adaptive Form components with template fields bind-adaptive-form-components-with-template-fields

Bind Adaptive Form fields with template fields to display captured form data in corresponding Submission PDF field. To bind Adaptive Form components with corresponding Submission PDF template fields:

  1. Open the Adaptive Form, configured to use a custom form template for editing.

  2. Select an Adaptive Form component and click open Configure Configure icon. It opens properties browser.

  3. In the properties browser, browse and select a field.

    • (For AcroForm template) the Document of Record Bind Reference field property.
    • (For XFA template) the Data Model Bind Reference property.
  4. Click Save.

You can use Send Email, Experience Manager Workflow submit action in conjunction with Document of Record step, and other submit actions to receive a Submission PDF.

Incremental updates to Submission PDF template document-of-record-template-incremental-updates

Adaptive forms and corresponding Submission PDF templates can evolve over the period of time. You can choose to add, remove, or modify fields to an Adaptive Form or a Submission PDF template.

When you change a Submission PDF template and upload the changed template to AEM Forms, the Adaptive Forms editor automatically detects the changed bindings and informs you about the adaptive form components that require new bindings. It lets you make incremental updates to a Submission PDF template.

For example, an Organization, We.Retail, has an AcroForm-based Submission PDF template, we-retail-invoice.pdf. The template looks like the following:

Original Template

After using the template for some time, organization decides to rename invoice-number field to bill-number field and capture email address of buyers. A developer updates name of the invoice-number field and adds an email field to the template. He also creates a new version of template called we-retail-invoice-v2.pdf.

Updated Template

The developer uploads and applies to the updated template to the adaptive form. The adaptive form automatically detects and displays list of fields where binding has changed.

Binding Error

The form developer binds Adaptive Forms fields with corresponding Submission PDF template.

Now, when the Adaptive Form is submitted an updated Submission PDF is created.

Updated-

Key considerations when working with Submission PDF key-considerations-when-working-with-document-of-record

Keep in mind the following considerations and limitations when working on the Submission PDF for Adaptive Forms.

  • Rich text support: Submission PDF supports HTML markup tags in rich text fields. For complete details on supported tags and accessibility considerations, see Supported HTML markup tags in Submission PDF.
  • Document fragments in an Adaptive Form do not appear in the Submission PDF. However, Adaptive Form Fragments are supported.
  • Content binding in Submission PDF generated for XML Schema based Adaptive Form is not supported.
  • Localized version of Submission PDF is created on demand for a locale when the user requests the rendering of the Submission PDF. Localization of Submission PDF occurs along with localization of Adaptive Form.

Mapping of Adaptive Form elements mapping-of-adaptive-form-elements

The following table describes Adaptive Form components and corresponding XFA components and if those appear in a Submission PDF.

Fields fields

Adaptive Form component
Corresponding XFA component
Included by default in Submission PDF template?
Notes
Button
Button
false
Check box
Check Box
true
Date picker
Date/Time Field
true
Drop-down list
Drop-down List
true
Scribble Signature
Signature Scribble
true
Numeric box
Numeric Field
true
Password box
Password Field
false
Radio Button
Radio Button
true
Text box
Text Field
true
Reset button
Reset Button
false
Submit button

Email Submit Button

HTTP Submit Button

false
Terms and conditions
true
File Attachment
false
Not available in Submission PDF template. Only available in Submission PDF through attachments.

Containers containers

Adaptive Form component
Corresponding XFA component
Notes
Panel
Subform
Repeatable panel maps to repeatable subform.

Static components static-components

Adaptive Form component
Corresponding XFA component
Notes
Image
Image
The TextDraw and Image components, whether bound or unbound, always appear in the Submission PDF for an XSD-based Adaptive Form, unless excluded using the Submission PDF settings.

Tables tables

The Adaptive Forms table components such as header, footer, and row map to corresponding XFA components. You can map repeatable panels to tables in Submission PDF.

Base template of a Submission PDF base-template-of-a-document-of-record

Base template provides styling and appearance information to Submission PDF. It lets you customize default appearance of auto generated Submission PDF. For example, you can use base template to add your company logo in the header and copyright information in the footer of the Submission PDF.

The master page from base template is used as a master page for Submission PDF template. The master page can have information such as page header, page footer, and page number that you can apply to Submission PDF. You can apply such information to Submission PDF using base template for auto generation of Submission PDF. Using base template enables you to change default properties of fields.

Always follow Base template conventions when you design base template.

Base template conventions base-template-conventions

A base template is used to define header, footer, styling, and appearance for a Submission PDF. The header and footer can include information like the company logo and copyright text. The first master page in the base template is copied and used as a master page for the Submission PDF, which contains header, footer, page number, or any other information that should appear across all pages in the Submission PDF. If you use a base template which does not conform to base template conventions, the first master page from the base template is still used in Submission PDF template. It is highly recommended that you design your base template as per its conventions, and use it for auto generation of Submission PDF.

Master page conventions

  • In the base template, name the root subform as AF_METATEMPLATE and the master page as AF_MASTERPAGE.

  • The master page with the name AF_MASTERPAGE located under the AF_METATEMPLATE root subform is preferred for extracting header, footer, and styling information.

  • If AF_MASTERPAGE is absent, the first master page present in the base template is used.

Styling conventions for fields

  • To apply style on the fields in the Submission PDF, the base template provides fields located in the AF_FIELDSSUBFORM subfrom under the AF_METATEMPLATE root subform.

  • The properties of these fields are applied to the fields in the Submission PDF. These fields should follow the AF_<name of field in all caps>_XFO naming convention. For example, the field name for check box should be AF_CHECKBOX_XFO.

To create a base template, do the following in Forms Designer.

  1. Click File > New.

  2. Select the Based on a template option.

  3. Select the Forms - Document of Record category.

  4. Select DoR Base Template.

  5. Click Next and provide the required information.

  6. (Optional) Modify the styling and appearance of fields that you want to apply on the fields in the Submission PDF.

  7. Save the form.

You can now use the saved form as a base template for Submission PDF. Do not modify or remove any scripts present in the base template.

Modifying base template

  • If do not apply any styling over fields in base template, it is advisable to remove those fields from base template so any upgrades to base template are automatically picked up.
  • While modifying base template, do not remove, add, or modify scripts.

Strictly follow above mentioned conventions and instructions to design a base template.

Customize the branding information in Submission PDF customize-the-branding-information-in-document-of-record

While generating a Submission PDF, you can change branding information for the Submission PDF on the Document of Record tab. The Document of Record tab includes options such as logo, appearance, layout, header and footer, disclaimer, and whether or not you want to include unselected check box and radio button options.

To localize the branding information that you enter in the Document of Record tab, ensure that the locale of the browser is set appropriately. To customize the branding information of Submission PDF, perform the following steps:

  1. Select a panel (root panel) in the Submission PDF and then select configure .

  2. Select dortab . The Document of Record tab appears.

  3. Select either the default template or a custom template for rendering the Submission PDF. If you select the default template, a thumbnail preview of the Submission PDF appears below the Template drop-down.

  4. Based on whether you select a default or a custom template, some of the following properties, or all properties, appear in the Document of Record tab. Specify the below mentioned properties to define the appearance of the Submission PDF:

    1. Basic Properties:

      • Template: If you choose to select a custom template, browse a select an XDP on your AEM Forms server. If you want to use a template that is not already on your AEM Forms server, you should first upload the XDP to your AEM Forms server.

      • Accent Color: The color in which header text and separator lines are rendered in the Submission PDF.

      • Font Family: Font family of the text in the Submission PDF.

        note note
        NOTE
        AEM Forms offers a variety of built-in fonts that seamlessly integrate with PDF files. To see the list of supported fonts, click here.
      • Include form objects that are not bound to data model: Setting the property includes unbound fields from Schema based Adaptive Form in Submission PDF.

      • Exclude hidden fields from the Document of Record: Setting the property identifies the hidden fields for exclusion from Submission PDF.

      • Hide description of panels: Setting the property excludes description of the panel/table from Submission PDF. Applicable for panel and table.

      Basic Properties

    2. Form Field Properties:

      • For Check Box and Radio Button components, show only the selected values: Setting the property displays only selected values of check box and radio button in Document of Record.
      • Separator for multiple value(s): You can choose any separator such as comma or line break to display multiple values.
      • Options Alignment: You can select the desired alignment (Horizontal, Vertical, Same as adaptive Form) to set the alignment for the fields such as check box or radio button to be displayed on Document of Record. By default, the vertical alignment is set for the fields in Document of Record. Setting the properties from the Form Field Properties of DoR overwrites the properties set in the Item Alignment for the fields on an Adaptive Form. In case, you select Same as Aaptive form option, the alignment as configured in an Adaptive Form author instance is used for Document of Record fields.
      • Number of options for horizontal alignment:You can set the number of options to be displayed on the Submission PDF for the horizontal alignment.

      Form Field Properties

      Display labels for multi-select dropdown

      This feature is available through the Early Access program. To request access, send an email from your official address to aem-forms-ea@adobe.com.

      The Submission PDF now displays the selected display labels for multi-select dropdown components instead of internal stored values. For example, if a user selects “California” and “New York” from a dropdown, the Submission PDF shows the selected labels instead of the internal values such as CA and NY.

    3. Master Page Properties:

      • Logo Image: You can either choose to use the logo image from the Adaptive Form, choose one from DAM, or upload one from your computer.
      • Form Title: Title of the DoR.
      • Header Text: Text that appears at the header section of the Submission PDF.
      • Disclaimer Label: Label of disclaimer.
      • Disclaimer: Text which specifies the scope of rights and obligations on the Submission PDF.
      • Disclaimer Text: Text of disclaimer.

      Master Page Properties

  5. To save the branding changes, select Done.

NOTE
To display a custom form title in your Submission PDF, edit the Custom Form Title in Document of Record Properties > Master Page Properties. This custom title:
  • Appears in the header of the generated PDF
  • Appears as the Title in the PDF’s document properties
  • Appears as the Initial View Title when the PDF is opened

Document of Record Support in Adaptive Form Editor dor-support-in-adaptiveform

You can configure the Document of Record template directly from the Adaptive Form editor or Adaptive Form template editor.

Perform the following steps from the author instance of Adaptive Form editor:

  1. Select the Adaptive Form container (Root) component.

  2. Click Configure Icon icon to open the Properties of the Adaptive Form container.

  3. Open the Document of Record Template tab and select from the following options:

    • None: When this option is selected no Document of Record template created for your Adaptive Form.
    • Associate Form Template as Document of Record Template:When this option is selected, XFA Form is used as a template for Submission PDF.
    • Generate Document of Record: When this option is selected, the Document of Record template is automatically generated for your Adaptive Form.
  4. Select Save to save the properties.

Document of Record Template Support

NOTE
When Document of Record template is created using an Adaptive Form Template editor, then only two options are available under Document of Record Template tab as None and Generate Document of Record.

Table and column layouts for panels in Submission PDF table-and-column-layouts-for-panels-in-document-of-record

Your Adaptive Form may be a lengthy one with several form fields. You may not want to save a Submission PDF as an exact copy of the Adaptive Form. Now you can choose a table or column layout for saving one or more Adaptive Form panels in the Submission PDF.

Before generating a Submission PDF, in a panel’s settings, select Layout For The Document of Record for that panel as Table or Column. The fields in the panel get organized accordingly in the Submission PDF.

Fields in a panel rendered in a table layout in the Submission PDF

Fields in a panel rendered in a table layout in the Submission PDF

Fields in a panel rendered in a column layout in the Submission PDF

Fields in a panel rendered in a column layout in the Submission PDF

Submission PDF settings document-of-record-settings

Submission PDF settings let you choose options you want to include in the Submission PDF. For example, a bank accepts name, age, social security number, and phone number in a form. The form generates a bank account number, and branch details. You can choose to display only the name, social security number, bank account, and branch details in Submission PDF.

Setting of the Document of Record component are available under its properties. To access the properties a component, select the component and click cmppr in the overlay. The properties are listed in the sidebar, and you can find the following settings in it.

Field level settings

  • Exclude From Document of Record: Setting the property true excludes the field from Submission PDF. This is script-able property named excludeFromDoR. Its behavior depends on Exclude fields from DoR if hidden form level property.

  • Display panel as table: Setting the property displays panel as table in Submission PDF if panel has less than 6 fields in it. Applicable for panel only.

  • Exclude title from Document of Record: Setting the property excludes title of the panel/table from Submission PDF. Applicable for panel and table only.

  • Exclude description from Document of Record: Setting the property excludes description of the panel/table from Submission PDF. Applicable for panel and table only.

Form level settings

  • Include unbound fields in DoR: Setting the property includes unbound fields from Schema based Adaptive Form in Submission PDF. By default it is true.
  • Exclude fields from DoR if hidden: Set the property to exclude the hidden fields from Submission PDF at form submission. When you enable Revalidate on server, the server recomputes the hidden fields before excluding those fields from the Submission PDF.

Use a custom XCI file

An XCI file helps you set various properties of a document. Forms as a Cloud Service has a master XCI file. You can use a custom XCI file to override one or more default properties specified in the master XCI file. For example, you can choose to embed a font into a document or enable tagged property for all the documents. The following table specifies the XCI options:

XCI option
Description
config/present/pdf/creator
Identifies the document creator using the Creator entry in the Document Information dictionary. For information about this dictionary, see the PDF Reference guide.
config/present/pdf/producer
Identifies the document producer using the Producer entry in the Document Information dictionary. For information about this dictionary, see the PDF Reference guide.
config/present/layout
Controls whether the output is a single panel or paginated.
config/present/pdf/compression/level
Specifies the degree of compression to use when generating a PDF document.
config/present/pdf/fontInfo/embed
Controls font embedding in the output document.
config/present/pdf/scriptModel
Controls whether XFA-specific information is included in the output PDF document.
config/present/common/data/adjustData
Controls whether the XFA application adjusts the data after merging.
config/present/pdf/renderPolicy
Controls whether the generation of page content is done on the server or deferred to the client.
config/present/common/locale
Specifies the default locale used in the output document.
config/present/destination
When contained by a present element, specifies the output format. When contained by an openAction element, specifies the action to perform upon opening the document in an interactive client.
config/present/output/type
Specifies either the type of compression to apply to a file or the type of output to produce.
config/present/common/temp/uri
Specifies the Form URI.
config/present/common/template/base
Supplies a base location for URIs in the form design. When this element is absent or empty, the location of the form design is used as the base.
config/present/common/log/to
Controls the location that log data or output data is written to.
config/present/output/to
Controls the location that log data or output data is written to.
config/present/script/currentPage
Specifies the initial page when the document is opened.
config/present/script/exclude
Informs Forms as a Cloud Service which events to ignore.
config/present/pdf/linearized
Controls whether the output PDF document is linearized.
config/present/script/runScripts
Controls which set of scripts Forms as a Cloud Service executes.
config/present/pdf/tagged
Controls the inclusion of tags into the output PDF document. Tags, in the context of PDF, are additional information included in a document to expose the logical structure of the document. Tags assist accessibility aids and reformatting. For example, a page number may be tagged as an artifact so that a screen reader does not enunciate it in the middle of the text. Although tags make a document more useful, they also increase the size of the document and the processing time to create it.
config/present/pdf/fontInfo/alwaysEmbed
Specifies a font that is embedded into the output document.
config/present/pdf/fontInfo/neverEmbed
Specifies a font that must never be embedded into the output document.
config/present/pdf/pdfa/part
Specifies the version number of the PDF/A specification that the document conforms to.
config/present/pdf/pdfa/amd
Specifies the amendment level of the PDF/A specification.
config/present/pdf/pdfa/conformance
Specifies the conformance level with the PDF/A specification.
config/present/pdf/version
Specifies the version of PDF document to generate
config/present/pdf/version/map
Specifies the fall back fonts for the document
NOTE
AEM Forms offers a variety of built-in fonts that seamlessly integrate with PDF files. To see the list of supported fonts, click here.

Use a custom XCI file in your Forms as a Cloud Service environment

  1. Add the custom XCI file to your development project.

  2. Specify the following inline property:

    code language-json
     {
      "xciFilePath": "[path of XCI file]"
     }
    

    For example,

    code language-json
     {
      "xciFilePath": "/content/dam/formsanddocuments/customMinionProBoldAndTagged.xci"
     }
    
  3. Deploy the project to your Cloud Service environment.

Use a custom XCI file in your local Forms as a Cloud Service development environment

  1. Upload the XCI file to your local development environment.
  2. Open Cloud Service SDK configuration manager. The default URL is: http://localhost:4502/system/console/configMgr.
  3. Locate and open the Adaptive Forms and Interactive Communication Web Channel configuration.
  4. Specify path of the XCI file and click Save.

Frequently Asked Questions faq

Q: Changes are not appearing in the Submission PDF.
Ans: Open the form in the Adaptive Forms editor, make a minor edit (for example, adjust a field label or reorder a field), and save the form. This regenerates the Submission PDF template and the changes appear in the next generated PDF.

See Also see-also

recommendation-more-help
fbcff2a9-b6fe-4574-b04a-21e75df764ab