Solved

wanted javascript code for  exporting  fdf to a disk file without prompting user

Posted on 2009-04-07
3
499 Views
Last Modified: 2012-05-06
Hi,

I don't know javascript but want some code to I want to be able to export FDF form values (under reader 8) to a disk.  I want to be able to specify a specific directory if possible without any user intervention.  If any trusted  code must be stored in the javascript directory, what is it or can that be avoided.

Thanks

Murray  
0
Comment
Question by:jbmsystems
  • 2
3 Comments
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 24115113
Have you looked at the method exportAsFDF() ?
 http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/JS_API_AcroJS.88.458.html

The description of the function states that it "can only be executed during batch and console events" if you want to specify an output path - this means, that you cannot run it interactively from  document, or even a folder level JavaScript.

Now, if you don't want this to happen interactively and you can collect all your PDFs first to extract the FDF files, you can use a batch sequence to do that, and you will be fine.
0
 

Author Comment

by:jbmsystems
ID: 24115310
I would like to make this interactive.  Is there a way to do that with trusted functions or can I save the entire PDF?

Thanks  
Murray
0
 

Accepted Solution

by:
jbmsystems earned 0 total points
ID: 24320308
I found out how to do it with trusted functions

in main form java script code
myTrustedSpecialTaskFuncFDF(this, "/c/temp/mySavedDoc.fdf");

the following functions are in the acrobat/reader javascript folders
myTrustedSpecialTaskFuncFDF = app.trustedFunction(function(doc,path)
{
// Privileged and/or non-privileged code above
app.beginPriv();
myExportAsFDF(doc,path);
app.endPriv();
// Privileged and/or non-privileged code below
});

myExportAsFDF = app.trustPropagatorFunction(function(doc,path)
{
app.beginPriv();
doc.exportAsFDF(true, true, null, true, path, false );
app.endPriv();
});


0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Update 21-May-2015: I temporarily removed the source code and the code snippets to make major changes to the program. Regards, Joe A recent question here at Experts Exchange piqued my interest, so I decided to provide a thorough solution and publ…
Update 21-May-2015: I temporarily removed the source code to make major changes to the program. Regards, Joe In a previous Experts Exchange article, How To Rename-Move a Batch of PDF Files Based on Contents of the Files (http://www.experts-exchan…
Sometimes we receive PDF files that are in the wrong orientation. They may be sideways or even upside down. This most commonly happens with scanned or faxed documents. It is possible to rotate the view of these PDFs with the free Adobe Reader produc…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question