Adobe Reader - added toolbar: example hello world

Hello world

I would create a "toolbar button" Adobe Reader that supports all version of it.

After a long search for this on the web found an article suggesting that this can be done with one of the 2 methods.

1 acrobat Javascript.

2 acrobat Plugins.

1 acrobat Javascript:

I managed to create a "toolbar button" in Adobe Reader with script placed in "C:\Program Adobe 10.0\Reader\Javascripts" below

Script:

function helloWorld()

{

App.Alert ("Hello World");

}

app.addToolButton({)

cName: "helloWorldBtn", / / name of your button

cExec: "helloWorld()", call //Function

cLabel: "Hello World", //The text on the button

cTooltext: "Say Hello World", //The text to help

cEnable: true

});

Problem with Javascript:

The only problem facing the implementation of my Javascript script is "I couldn't call a method ActiveX or a DLL of this Javascript.

I tried to create new ActiveXObject in code, but it thorws runtime error saying that it ActiveXObject is an unrecognized keyword. (The same "new ActiveXObject" works very well in normal Javascrirpt.

2 acrobat Plugins.

I couldn't find a good sample of "Helloworld" for the creation of a toolbar of the sample on the internet. I think, Plugins, that it would be easier to call the method other DLL by adding a reference or on COM.

Could someone help me is done with a more simple to make with this best sample. Please don't recommend the SDK samples, I don't really understand anything out of it.

If we can create the toolbar with c# or VB, it would be better for me.

Hope you got my problem. Thanks in advance.

Please come back to me if one of my guesses to are wrong.

Yes, these are the two ways to create a button in toolbar - JavaScript or Plugin.

You are also right that you can't do anything with ActiveX or DLL from Acrobat JavaScript - which is the same engine of JavaScript in Mozilla/FireFox.  However, add many browsers to additional custom objects (for example, ActiveX), which may be what you think of...

Plugins are written in C/C++, and they are documented in the Acrobat SDK kit.  You will need to download what to build.  It includes documentation, sample code, etc.  HOWEVER, be aware that, in order to develop a plugin for the reader, you must obtain a license from Adobe.  There is a cost and process for this license, and details are provided in the SDK.

Tags: Acrobat

Similar Questions

Maybe you are looking for