How to Flatten an Adobe XML (XFA) Form with Attachments
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.

- 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 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.
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.
Open your Adobe XML form in your designated PDF viewer and navigate to 'File' > 'Print'.
Choose 'Print to File', a PostScript printer, or a virtual PDF printer (like Microsoft Print to PDF) from the printer dropdown menu.
Click 'Print' and choose a destination on your local drive to save the new PostScript or PDF file.
If you printed to PostScript, open the resulting .ps file in your PDF editor to automatically convert it back into a standard, flattened PDF.
Open the newly flattened PDF and use the 'Attachment' tool in your PDF editor to manually re-embed any necessary files.

Use Direct Print to PDF
A faster alternative to flattening the document using standard operating system print-to-PDF features.
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. Open Your PDF: Launch WPS Office and open your PDF document.
- 2. Flatten via Print: Go to the 'Menu', select 'Print', and choose 'WPS PDF' as your printer to create a flattened copy.
- 3. Navigate to Attachments: Open the newly flattened PDF and go to the 'Comment' or 'Insert' tab.
- 4. Embed Files: Click on the 'Attachment' tool to browse your computer and manually re-add your required files into the static document.

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.




