Solved

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

Posted on 2009-04-07
3
487 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Acrobat’s JavaScript is a great tool to extend the application, or to automate recurring tasks. There are several ways a JavaScript can be added to the application or a document (e.g. folder level scripts, validation scripts, event handling scripts,…
Update 21-May-2015: I temporarily removed the source code to make major changes to the program. Regards, Joe INTRODUCTION This article presents a solution to a question (http://www.experts-exchange.com/Programming/Installation/Q_28396542.html)…
In this first video of the three-part Xpdf series, we introduce and describe Xpdf, a library containing nine command line utilities that perform various functions on PDF files. We show where the library is located and how to download it, discuss its…
In this video, we show how to perform Bates Numbering/Stamping of PDF documents using Power PDF Advanced, the newest product from the Document Imaging division of Nuance Communications. There are two editions of Power PDF — Standard and Advanced. Th…

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now