These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

exportData

phgn
Registered: Sep 17 2007
Posts: 2

Does xfa.host.exportData work from Reader? If so, how do I set it up.
 
I'm a newbie to the pdf world, trying to use livecycle and javascript to create a form that will produce an xml file that will then be processed by another application.

My Product Information:
LiveCycle Designer, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
This functionality has major problems. First, "xfa.host.exportData" is not a real function. Acrobat re-routes the function call to a native Acrobat JavaScript function, "doc.exportXFAData()". The documentation for "xfa.host.exportData" is not very specific. And for a good reason. XFA is not necessesarily Acrobat/PDF, so the help docs can't give Acrobat Specifics. However, Acrobat/PDF is the defacto platform for XFA, so when LiveCycle functionality crosses the boundary into Acrobat you're better off understanding Acrobat JavaScript.

In this case, the "exportXFAData" function can only be executed from a privileged context, and addtionally, if the document is in Reader, it must have "Form Save Rights".

Here's the problem. The XFA reference doesn't say you need to execute the function from a privileged context. It says the form has to be certified. Certifying a PDF gives it privilege as long as the certification is valid. Here's the problem. While form filling is ok, some form actions like hiding or showing a field can invalidate the certification. This get much worse for a dynamic LiveCycle form.

So the short answer is that it's suppose to work, but doesn't. All the restrictions they put on this stuff makes exporting data an unreasonable task for a form distributed to Reader users.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

robman
Registered: Sep 18 2007
Posts: 25
do you have some ways to get the form data by user filled?
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Please Explain more.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

roshink
Registered: Jun 1 2008
Posts: 6
Hi andrewton,

To "Enable Usage Rights", open the same PDF file in Adobe Professional 8.0 and go to Advanced options ==> Enable Usage Rights in Adobe Reader.Still I am working on this issue of PDF to XML Export/Conversion from the PDF Reader.

Thanks & Regards,
Roshin Kannoth
blaxxun
Registered: Jun 16 2008
Posts: 8
using that option does not work for me.. only change it makes is that before this user was unable to save data in reader and now he is. But export option still does not work.

I tried even certifying the pdf but that doesn't work either.

@thomp

tried the Adobe Document Center as well but I dont see any option which says "Form Save Rights" or "export" rights. There were only three options - 1. print, 2. Copy, 3. Comment, sign-in, fill. I was using the trial sign up. Is that the problem? I want to make sure that it is possible before buying the service. thanks in advance.