PDF Editing Issues

How to Save a PDF Form as XML with a Button in Acrobat

Anum MushtaqAnum Mushtaq Oct 28, 2026 869 views

Question details

The user wants to add a clickable button to a PDF form that automatically saves the completed data as an XML file and needs to know if this setup can be easily distributed to multiple users.

How to Save an Acrobat PDF Form as XML Using a Button
Product
Adobe Acrobat
Device & OS
not provided
Scenario
Creating an interactive PDF form for multiple users to fill out, where the submitted data needs to be collected in XML format for database integration or automated processing.
Observed behavior
Users are looking for a simple, built-in action to output XML via a button, but Acrobat restricts local file saving for security reasons, often requiring custom JavaScript or alternative submission formats like XFDF.
Before you start

Ensure you have Adobe Acrobat Pro installed, as the free Adobe Reader does not include the tools required to create interactive form buttons, configure submission actions, or add document-level JavaScript.

Solution 1Recommended

Use the Built-in XFDF Form Submission Action

Instead of writing complex scripts for raw XML, use Acrobat's built-in form submission feature to export data as XFDF, an XML-based format designed specifically for PDF forms.

XFDF is a highly supported, XML-based format used by Adobe to handle form data and annotations. Setting up a button to submit XFDF is straightforward and natively supported without requiring users to install custom security scripts on their local machines.

1
Open Prepare Form Mode

Launch Adobe Acrobat Pro, open your PDF form, and select 'Prepare Form' from the right-hand tools pane.

2
Add a Button

Click the 'Button' icon in the top toolbar and drag it onto your document to create a new interactive button.

3
Configure Button Actions

Double-click the button to open the Button Properties dialog. Navigate to the 'Actions' tab and set the Select Trigger to 'Mouse Up'.

4
Set Submission Format

In the Select Action dropdown, choose 'Submit a form' and click 'Add'. Enter your data collection URL (or a mailto: email address) and select 'XFDF (XML-based FDF)' as the Export Format. Click 'OK' to save.

Use the Built-in XFDF Form Submission Action
Distribution Ready: Unlike custom local-save scripts, this built-in submission method works seamlessly when distributed to multiple users, even if they are using the free Adobe Reader.
Easy PDF Form Management

Effortlessly Fill and Manage PDF Forms with WPS Office

While configuring custom JavaScript for XML extraction in Adobe Acrobat can be restrictive and difficult to distribute, WPS Office offers a straightforward, user-friendly PDF editor. You can easily fill out, save, and manage interactive PDF forms without dealing with complex scripting or security permissions.

  1. 1. Open Your PDF Form: Launch WPS Office, click on 'PDF', and open the interactive form document you need to fill out.
  2. 2. Fill in the Data: Click directly into the highlighted form fields to input your text, select checkboxes, or choose from dropdown menus.
  3. 3. Save and Share: Once the form is complete, click 'Save' to preserve the entered data locally, or use the 'Share' feature to send the completed PDF directly to your team or clients.
Seamlessly open, fill, and save interactive PDF forms with an intuitive interface.Highly compatible with Adobe Acrobat PDF formats and Microsoft Office files.Lightweight software architecture ensures fast loading and smooth editing.Free to use for basic PDF reading, form filling, and document conversions.
microsoft office alternative - wps office

Frequently Asked Questions

What is the difference between XML and XFDF in PDF forms?

XFDF is an XML-based file format specifically designed by Adobe to store PDF form data and annotations. It strictly follows standard XML syntax but utilizes a predefined schema tailored for PDFs, making it the easiest and most reliable way to export form data without writing custom parsing code.

Why won't my JavaScript button save the XML file on another user's computer?

Adobe Acrobat employs a strict security model that prevents standard document-level scripts from accessing or silently writing files to a user's local hard drive. To allow local saving via a button, a trusted 'folder-level' script (.js file) must be manually placed inside the Acrobat installation folder on every individual user's computer.

Can users with the free Adobe Reader execute form submission buttons?

Yes, provided the button is configured using Acrobat's built-in 'Submit a form' action (such as sending XFDF data to an email address or web server). Free Adobe Reader users can successfully click the button and submit the data as long as they have an active internet or email client connection.