[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

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

Posted on 2009-04-07
3
Medium Priority
?
577 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

This article explains how to perform batch conversion of PDF, TIFF, and other image file formats into PDF, PDF Searchable, and TIFF files via a command line interface, using Nuance's latest document imaging software — Power PDF Advanced.
The Adobe PDF proprietary file format is recognized as secure and formulated. But these PDF files are also prone to corruption and any external threat like virus attacks, improper storage can hit PDF file integrity.This type of damages can make cruc…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
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…

656 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