[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 595
  • Last Modified:

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

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
jbmsystems
Asked:
jbmsystems
  • 2
1 Solution
 
Karl Heinz KremerCommented:
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
 
jbmsystemsAuthor Commented:
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
 
jbmsystemsAuthor Commented:
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now