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

How to export the XFDF file from the PDF?

prabudass
Registered: Aug 14 2008
Posts: 71

I need to export the XFDF file from the PDF and then save that xfdf file in the same location through javascript. I used this.exportAsXFDF(); for exporting. But i dont know how to save that xfdf file through scripting. Kindly advice me. This is for Acrobat 8.0 professional.

My Product Information:
Acrobat Pro 8.0, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
We'll it seems like you are moving in the right direction.

To export data from the PDF, place a button on your form and add a "Run a JavaScript" Action to that button that runs this code

this.exportAsXFDF();

However, in order for this function to silently save the XFDF to a specific folder loaction and name the "exportAsXFDF" function has to be called from a privileged context. This means that it cannot be done from a script in a PDF. It can only be done from a trusted function in a folder level script.

Further more, if this form will be used in Reader, then it will need to be Reader Enabled with "Export" Rights. You'll have to purchase these from Adobe.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

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

Bananafeller
Registered: Apr 14 2009
Posts: 3
Hi!
What are the Condition for the "Export" function in the Reader!
How much does it costs?
Thanks for answering.
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Using any of the Export Data functions in Reader requires Export Data Rights on the document in question. If you want to save to a specific location, as opposed to having the user select the folder location, then this function has to be run from a privileged context, i.e., a trusted function or the console window.

You can get the cost of applying Reader Enabling Rights from an Adobe Sale Rep. They are the only ones who know.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

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