Solved

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

Posted on 2009-04-07
3
515 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Getting information about Fonts being used in a PDF file A colleague of mine recently faced an issue related to the PDF file format. The PDFs were containing mission critical client information, they were successfully mailed but there was a sm…
*Adobe Acrobat 9 was used for this article.  Particular steps may vary depending on software versions. Adobe Acrobat has many, many variables that my be utilized to customize your forms for clarity and ease of use. The Form Editing Tool will be y…
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…

730 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