PDF Conversion Issues

How to Flatten an Adobe XML (XFA) Form with Attachments

Algirdas JasaitisAlgirdas Jasaitis Nov 3, 2026 868 views

Question details

The user wants to flatten an Adobe XML (XFA) form to create a non-editable copy while preserving its file attachments and visible signature data.

How to Flatten an Adobe XML Form with Attachments
Product
PDF Editors
Device & OS
not provided
Scenario
Converting an interactive, signed XFA form that contains file attachments into a static PDF document for archiving or sharing.
Observed behavior
Standard flattening or print-to-PDF workflows omit non-printing content like file attachments and permanently destroy the cryptographical validity of digital signatures.
Before you start

Before proceeding, ensure you have saved a backup of your original interactive XFA form, as the flattening process will permanently remove the validity of any digital signatures and strip out existing file attachments.

Solution 1Recommended

Print to PostScript and Convert to PDF

This method creates a completely flattened, static visual representation of the XFA form. Because printing drops non-printable data, attachments must be re-added afterward.

Printing to a PostScript file or directly to a virtual PDF printer captures only the visual layout of your document. While this perfectly preserves the visual representation of digital signatures and form fields, it inherently discards backend data like cryptographic signatures and embedded file attachments.

1
Open the Print Dialog

Open your Adobe XML form in your designated PDF viewer and navigate to 'File' > 'Print'.

2
Select PostScript or Virtual Printer

Choose 'Print to File', a PostScript printer, or a virtual PDF printer (like Microsoft Print to PDF) from the printer dropdown menu.

3
Generate the Static File

Click 'Print' and choose a destination on your local drive to save the new PostScript or PDF file.

4
Convert Back to PDF (If Applicable)

If you printed to PostScript, open the resulting .ps file in your PDF editor to automatically convert it back into a standard, flattened PDF.

5
Reattach Required Files

Open the newly flattened PDF and use the 'Attachment' tool in your PDF editor to manually re-embed any necessary files.

Print to PostScript and Convert to PDF
Signature Validation: It is entirely intended that flattening destroys digital signatures. Flattening a file while preserving a valid signature would be a critical security flaw. Always keep the original file as the authoritative record.
Professional PDF Editor

Manage Attachments and Flatten PDFs with WPS Office

WPS Office offers a comprehensive suite of PDF tools that make it easy to manage file attachments, edit documents, and flatten PDFs quickly using its built-in virtual printer.

  1. 1. Open Your PDF: Launch WPS Office and open your PDF document.
  2. 2. Flatten via Print: Go to the 'Menu', select 'Print', and choose 'WPS PDF' as your printer to create a flattened copy.
  3. 3. Navigate to Attachments: Open the newly flattened PDF and go to the 'Comment' or 'Insert' tab.
  4. 4. Embed Files: Click on the 'Attachment' tool to browse your computer and manually re-add your required files into the static document.
Built-in Print to PDF functionality to effortlessly flatten documents.Easily add, extract, or delete embedded file attachments in any PDF.Highly compatible with standard Adobe PDF formats and features.Lightweight alternative with advanced PDF markup and editing tools.
microsoft office alternative - wps office

Frequently Asked Questions

Why do digital signatures become invalid when I flatten an XFA form?

Flattening a PDF converts interactive elements and backend cryptographic signature data into a static visual image. This intentionally breaks the signature's validity as a security measure to prevent modifications or tampering after the document is structurally changed.

Can I flatten an XML form without losing its file attachments?

No. Standard flattening methods, such as printing to PDF, only capture visible, printable content. File attachments are non-printable background data, so they are naturally dropped during the process and must be re-added manually.

Why can't I open an XFA form directly on my mobile device?

Dynamic XFA forms require specific Adobe software architectures to render their interactive XML components correctly. These architectures are generally not supported by standard mobile PDF viewers. Flattening the file on a desktop first turns it into a standard PDF, making it readable on mobile devices.