Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

XML

Participant ,
Aug 15, 2018 Aug 15, 2018

I want to put a button on a form, that saves the completed form to XML? Can that be done?

TOPICS
PDF forms
997
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
1 ACCEPTED SOLUTION
Community Expert ,
Aug 15, 2018 Aug 15, 2018

Not sure... If you want them to be able to do it automatically then they would need to install a script on their machine, yes.

View solution in original post

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 15, 2018 Aug 15, 2018

Not directly. You would need to write a function that generates the XML file yourself.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 15, 2018 Aug 15, 2018

Thank you, this is what I am looking for.

I had code under a button to print if fields are filled, used else this.print.

So not sure how to do it.

This does not have to check fields, just a button to save as xml.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 15, 2018 Aug 15, 2018

Want you export the form data or the whole form?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 15, 2018 Aug 15, 2018

This has nothing to do with printing. You would need to write a function that iterates over all the fields in the file, generating an XML string using their names and values. Then you write that string to a data object (an attachment) and export it, so the user can save it locally.

This will only work in Acrobat, though. In Reader the best you can do is display the XML string in the console window or a dialog and ask the user to copy it from there, and then paste it into Notepad and save as an XML file.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 15, 2018 Aug 15, 2018

Well I have a button, executes file item....Save As.....so just a step further to have the xml type already chosen?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 15, 2018 Aug 15, 2018

Ah, you want to export the entire file contents, not just the form data?

If so, then it can be done, but you would need to install a script on the user's local machine to do it, as it requires using the saveAs command.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 15, 2018 Aug 15, 2018

Hi, so this is like the other script I installed from you. Worked great.....but then I want to distribute this file to many users, that is an issue correct?

Wait, now I do not recall, did we embed that script?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 15, 2018 Aug 15, 2018

Not sure... If you want them to be able to do it automatically then they would need to install a script on their machine, yes.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 15, 2018 Aug 15, 2018

Thanks, that is what I need. post pdf, person downloads, fills out, clicks button and it is saved to their local or attached to email as XML.

Will have to then write instructions for them to save as on their own.

Thanks you

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 15, 2018 Aug 15, 2018
LATEST

Isn't XFXF which is a submit option, an XML? Or is that not the question? (This is the submit form options)

Screen Shot 2018-08-15 at 17.56.40.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines