These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

this.exportDataObject does not work

vinothjaguva
Registered: Jul 15 2008
Posts: 4

Hi

How to save the exported file with out asking dialogue box using Javascript folder option.

this.exportDataObject(cPath:"/c/temp/annotation.xml");

this.exportDataObject(cPath:"/c/temp/annotation.xml", nLaunch: 0);

Thanks in Advance

My Product Information:
Acrobat Pro 8.1.2, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
First off, you're using this function incorrectly. But even if your syntax was correct it wouldn't work. Please refer to the Acrobat JavaScript Reference. In it you'll see that the "CDIPath" parameter is no longer supported (Acrobat 6 and later). There is no way to get around this. It simply cannot be used, period. It's gone, dead, no longer exist.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

vinothjaguva
Registered: Jul 15 2008
Posts: 4
My aim is to extract annotation from PDF and storeing the value into txt file.

The function will needs to automatically open PDF from the user mentioend particular location from the opend file the annotataion needs to extract, and once extracted the PDF file and txt file needs to move to the another location.

I am using menu function to extract the annotations.

oDoc = app.openDoc({
cPath:"/C/temp/myDoc.pdf",
bHidden: true
});
app.addMenuItem( { cName: "Annote", cUser: "Annotation", cParent: "Tools", cExec: "AnnoExt()", nPos: 0 } );

Can you help on this.
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
From Acrobat Professional or Standard the "doc.exportAsFDF()" function can be used to extract the Markup Annotations into an FDF file. Experiment with using this function from the JavaScript Console Window before using it in a script. Depending on what you are doing with the Annotation data, FDF may not be your ideal format, but it is one of a very few options, and the only option if you want to write the data locally.

This function can certainly be used from a menu item script, or a toolbar button script. But it must be placed in a trustedFunction.

Since the file needs to be moved to another location, and it may also need to reformated after it has been extracted, you should consider controling this process from a VB application through the Inter Application Communication(IAC) interface. You'll find documentation on this API here.

http://www.adobe.com/devnet/acrobat/

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script