How to Submit a PDF Form as Both PDF and XML Data
Question details
The user needs to submit a filled PDF form and extract its data in XML or XFDF format within a single submission process.
- Product
- Device & OS
- not provided
- Scenario
- Handling automated or manual workflows that require both the complete visual PDF document and the structured form data (XML/XFDF).
- Observed behavior
- Standard PDF submit actions only allow sending one format at a time, making simultaneous submission of both PDF and XML challenging in native settings.
Ensure that the recipient's backend system or workflow is equipped to handle and parse exported XML or XFDF data files from filled PDF forms.
Submit the Completed PDF and Extract XML Data Separately
Since standard submit actions send only one format, the most reliable method is to send the full PDF and have the receiver export the data.
Standard PDF form submission protocols restrict you to sending either the entire PDF or just the structured data (FDF, XFDF, XML) at a given time. Attempting both simultaneously in a single standard action is unsupported by most PDF readers.
To achieve the desired workflow, the best practice is to submit the complete, filled PDF document to the recipient. Once received, the recipient or backend system can automatically or manually export the embedded form fields into an XML or XFDF file for database processing.
Open the document in your PDF reader or editor and complete all required interactive fields.
Use the standard email attachment method to send the full, saved PDF document to the required recipient or workflow address.
Upon receiving the file, the recipient opens the PDF and uses the 'Export Form Data' or equivalent extraction feature to save the field values as an XML or XFDF file.

Use JavaScript to Automate Data Extraction
Automate the XML data extraction process on the receiving end using document-level JavaScript.
Handle PDF Forms and Extract Data with WPS Office
WPS Office provides robust tools for filling, saving, and managing PDF forms. It supports seamless PDF completion and offers high compatibility with standard form fields, making your document workflow highly efficient.
- 1. Open your PDF form: Launch WPS Office and open your interactive PDF form.
- 2. Fill in the fields: Click on the required text fields, checkboxes, and dropdowns to fill out the form completely.
- 3. Save the completed PDF: Click 'Save' or press Ctrl+S to save the completed PDF document to your local drive.
- 4. Submit the document: Send the saved PDF via email or upload it directly to your required workflow system so the recipient can extract the XML data.

Frequently Asked Questions
Can I send both PDF and XML formats with a single 'Submit Form' button?
No, standard PDF 'Submit Form' actions are designed to send only one selected format (either the whole PDF, FDF, XFDF, or HTML/XML data) at a time.
Why doesn't the PDF email submission button work on my mobile device?
Email submission triggers built into PDFs often rely on desktop email clients. Mobile platforms and non-standard PDF viewers frequently lack the necessary integration to process these specific scripts reliably.
What is the difference between XML and XFDF in PDF forms?
Both are structured data formats used to store form field values. XFDF is an XML-based format specifically designed for PDF form data and annotations, whereas standard XML is a broader data format used across various applications.
How can the recipient extract the XML data from the submitted PDF?
The recipient can open the submitted PDF in a professional PDF editor and use the 'Export Form Data' or 'Extract Data' feature, selecting XML or XFDF as the desired output format.




