Skip to main content
Participant
November 2, 2022
Question

Extract values of a PDF form to a XML file using JS actions in Adobe Acrobat

  • November 2, 2022
  • 2 replies
  • 573 views
 

I'm trying to get values of some specific form fields and then generate a XML file based on that data using JS actions when a user clicks a button in Adobe Acrobat. It's possible to get those values but I'm not sure how to generate that xml and provide it to the user. I do check these documents but can't find anything related:

https://www.adobe.com/devnet-docs/acrobatetk/tools/Mobile/iosapi/files/Doc.js.htmltherapy

https://www.adobe.com/devnet-docs/acrobatetk/tools/Mobile/iosapi/files/App.js.html

https://www.adobe.com/devnet-docs/acrobatetk/tools/Mobile/iosapi/files/Util.js.html

https://www.adobe.com/devnet-docs/acrobatetk/tools/Mobile/iosapi/files/Event.js.html

https://www.adobe.com/devnet-docs/acrobatetk/tools/Mobile/iosapi/files/Field.js.html

Any help would be appreciated.

This topic has been closed for replies.

2 replies

try67
Community Expert
Community Expert
November 2, 2022

You can only do it if the file is going to be used exclusively in Acrobat. You can't generate files in Reader.

What you can do there, though, is display the XML output in a window, and instruct the user to copy it from there.

The XML string can be composed just like any other string in your code. This will require the development of a custom-made script, though. If you're interested in hiring a professional developer to do it for you, feel free to contact me privately to discuss it further.

 

What does the Excel file you attached have to do with this question, though?

Peru Bob
Community Expert
Community Expert
November 2, 2022

Moved to the Acrobat forum.