Expand my Community achievements bar.

xfa.host.exportdata("filename.xml",true);

Avatar

Level 3

I have a dynamic form that i'm trying to export the XML w

/data from within the PDF by clicking a button.  However, on the click

method I have the xfa.host.exportdata("filename.xml", true); does not export anything

nor does it actually create a file.  Nothing happens....

10 Replies

Avatar

Level 10

In your case, you probably opening the file in Adobe Reader. For exportData function to work, you need Adobe Acrobat.

Thanks

Srini

Avatar

Level 3

Actually, I was running it within livecycle under the preview pdf....  I need this to be able to work within the reader environment.  Any other suggestions?

Avatar

Former Community Member

You cannot pass a filename .....leave the filename blank and a file dialog will pop up and allow the user to select the file.

Paul

Avatar

Level 10

You need to have Reader Extensions permissions applied on the form using the Server component to make the exportData function to work in Adobe Reader.

Thanks

Srini

Avatar

Level 3

leaving the filename off did not work....

Avatar

Former Community Member

If you are using Reader you must Reader extend the form using LiveCycle Reader Extensions server.

If you are using Acrobat you do not need to do anything to it.

Paul

Avatar

Level 3

We don't want to spend the money to purchase the server....  The issue is we are trying

to extract the xml from dynamic pdf files... none of the APIs

are able to extract the xml from

the dynamic.

Avatar

Former Community Member

Your only option woudl be to post the data (like a browser would) to a web server then you can do to it what you want. You can Reader Extend using Acrobat and that will allow you to save the PDF (with data in it) but you will not be able to save just the data without the extending the form or by using Acrobat.

Paul

Avatar

Level 1

"In your case, you probably opening the file in Adobe Reader. For exportData function to work, you need Adobe Acrobat."

Thank you! I was tearing my hair out trying to figure out why the function wasn't working. Only tried using Reader the whole time.

I'd advise that this fact should be made known in the documentation and help file.

Avatar

Level 10

Hi,

Check t he summary PDF that we have here. It attempts to summarise the features that are available depending on:

  1. What the user has, Acrobat or Reader.
  2. If the form is Reader Enabled.
  3. How the form was Reader Enabled, in Acrobat or LC Reader Extensions ES2.

http://assure.ly/etkFNU

Hope that helps,

Niall