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

using MenuItem

mcapps
Registered: Jan 24 2008
Posts: 25

I am using latest version of acrobat 8 and I’m trying to save a FDF using JavaScript. The problem I am having is using the app.execMenuItem('ADBE:ExportMenuItem') I add the ADBE:ExportMenuItem to the twhitelist in the registry, but when I try and use it I get a "InvalidArgsError " I’m not sure why I get this error cause. I can get the JavaScript to work on another computer. I just want to know why it won’t work on both computer and if there some JavaScript setting that I cant fine that should be set to let me use the app.execMenuItem('ADBE:ExportMenuItem').

My Product Information:
Acrobat Standard 8.1.2, Windows
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
Have you reviewed Acrobat 8's JavaScritp API documentation?

There could be security restrictions added or changed or name changes depending upon the version of Acrobat/Reader on each computer.

For version 5 the menu item is "Export" and for verision 7 the name has changed to "FormData_ExportData" and "AcroForm:Advanced_ExportData".

George Kaiser

mcapps
Registered: Jan 24 2008
Posts: 25
this is the one we should use its working in one computer that has acrobat 8 on it
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
It works with version 8. But my crystal ball is cloudy and it can not tell me what the other computer's Acrobat/Reader version is. This information migh be helpful in disclosing the problem.

George Kaiser

mcapps
Registered: Jan 24 2008
Posts: 25
Hte two computers im working with only have acrobat 8 professional and reader on them
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
Well, Reader does not by default support import or export of FDF's or other data. If you check Reader's menu you should not find an option for this action. If you check the Acrobat JavaScirpt API, you will note that the import and export of FDF data is possible by Reader only when Extended Reader Rights are applied to the PDF form. And since there is no menu item in Reader, this method can not be used. You will have to use the "doc" objects "exportAsFDF" and since there are now some security restrictions, you will also need to observe those restrictions. All of this is documented in the Acrobat JavaScirpt API Reference.

George Kaiser

mcapps
Registered: Jan 24 2008
Posts: 25
I have reader on both computers but I also have acrobat 8 professional on them to and that is what im tring to use ADBE:ExportMenuItem in
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
Have you tried the exportAsFDF() JavaScript method? That would be my first choice.

George
mcapps
Registered: Jan 24 2008
Posts: 25
that method dosent work for me cause im im opening the ped from a program and when i save it as the fdf . The name were the fdf and the were the fdf is save are all reafy set with the "exportAsFDF() " i have to set the name and loction every time a pdf is saved