PDFM_S02011 errors when merging XFA forms in AEM Forms Assembler

PDFM_S02011 errors occur when merging flat PDFs with XFA-based forms using Adobe Experience Manager (AEM) Forms Assembler. Update the DDX configuration to flatten XFA content before merging.

Description description

When using Adobe Experience Manager (AEM) Forms Assembler to merge PDF documents, errors occur if one or more of the PDFs are XFA-based forms. This results in the PDFM_S02011 error, indicating that the document cannot be assembled because it is an XFA-based form.

Environment

Adobe Experience Manager (AEM) 6.5.x with AEM Forms Add-on (On-Premise)

Symptoms

  • Merge operations involving a flat PDF and an XFA-based PDF fail.

  • The Assembler service returns errors such as:

    • AEM-ASM-S00-002: Failed to execute the DDX
    • PDFM_S02011: Document < document name>
  • Merging two regular (flat) PDFs succeeds, but merging a flat PDF with a static or dynamic XFA form fails.

Cause

The Assembler service cannot merge XFA-based PDFs with other documents unless the XFA content is first removed or flattened. The DDX must include instructions to flatten the XFA structure before merging.

Resolution resolution

Follow these steps to resolve the issue:

  1. Update your DDX (Document Description XML) to include the <NoXFA/> element for each XFA-based PDF source. This instructs the Assembler service to flatten the XFA structure before merging. Example DDX:

    code language-none
    <?xml version="1.0" encoding="UTF-8"?>
    <DDX xmlns="http://ns.adobe.com/DDX/1.0/">
      <PDF result="combined.pdf">
        <PDF source="flatdocument.pdf"/>
        <PDF source="xfadocument.pdf">
          <NoXFA/>
        </PDF>
      </PDF>
    </DDX>
    

    Save the DDX file and use it in your merge call.

  2. Ensure that the source names in your DDX match the names of the documents you provide to the Assembler service. Also, check that the result attribute matches your expected output file name.

  3. If you do not want any interactive form fields in the merged PDF, you can also add <NoForms/> alongside <NoXFA/> under the relevant PDF source.

  4. For dynamic XFA forms, ensure that the Output service is available and running. The Assembler service uses the Output service internally to flatten dynamic XFA forms. For static XFA forms, the Output service is not required.

  5. Retry the merge operation with the updated DDX configuration.

  6. Verify that the merge operation completes successfully and that the output PDF is generated as expected.

recommendation-more-help
experience-cloud-kcs-help-kbarticles