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

Import Xml into PDF with out open file dialog

karthi
Registered: Oct 11 2011
Posts: 3

Hi,
 
I want the add the values into the drop down from the xml file.
The file has to be attached programmatically. when i use importDataObject it opens a file dialog. I just want to attach by specifying the path with out file open dialog.Please suggest.

karthi

My Product Information:
LiveCycle Designer, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Importing (or exporting) data transparently from the local file system is a privileged operation. So you need to create a privileged context for your code. There are two ways to do this.

1. Put the import code into a trusted folder level function, then call the function from your form.
2. Certify the PDF with a digital signature/certificate that is registered on the system where the form is used.


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

karthi
Registered: Oct 11 2011
Posts: 3
Even if i put the files in the trusted folder , it opens a file dialog. I have tried with importdocument function. Could you please suggest any other function.

karthi

thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Read these articles:

http://acrobatusers.com/tutorials/importing-and-exporting-pdf-file-attachments-acrobat-javascript

http://acrobatusers.com/articles/getting-external-data-acrobat-x-javascript


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