hi,
can we able to create doc level button in tool bar?i want to create custom sticky note tool in my pdf,how it is possible?
please help me
Regards
Venkat
Yes. When you create a document-level button using app.addToolButton method, it creates a the button in a floating toolbar. Here's a link to the documentation: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_A croJS.88.134.html
thanks for your quick reply,
but i try that code,am not getting any button on tool bar,
The process is like this i done,
i create a test.pdf ,in menu bar Advaneced--->Document Processing-->DocumentJavaScriptFunction,i create function stickynote and i add a code here and i save the pdf file and close it
when i open the test.pdf its not reflecting on the pdf,i need to do any setting for it?
please explaine about it
am using acrobat pro-9.x version
my requirement is i want to add a button(custom sticky note button for ereview) on the tool bar,and i should be avilable to reader also,
please help me
Thanks&Regards
Venkat
hi
i want like this tool bar button,i done by folder level js,but i want document level,if i send this pdf to some other i have to send the js file,if its document leavel,its easy to use and no need to send the js file
first i try the example code:
fuction test(){
app.addMenuItem({ cName: "Hello", cParent: "File",
cExec: "app.alert(event.target.info.title, 3);",
cEnable: "event.rc = (event.target != null);",
nPos: 0
}
test();
i added the abov code in the document javascript i did not get any alert msg.
even i d't get the 'Hello' in file menu
please help me
Thanks&Regards
Venkat
hi,
can we able to create two buttions in app.addToolButton(),
Ex:-
app.addToolButton({
cName: "myButton1",
oIcon: iconStreamObj,
cExec: "app.alert('You have clicked the JavaScript toolbar button1.');",
cTooltext: "This is my button1",
nPos: 0
},{
cName: "myButton2",
oIcon: iconStreamObj,
cExec: "app.alert('You have clicked the JavaScript toolbar button2.');",
cTooltext: "This is my button2",
nPos: 0
});
is it possible?please suggest me if any other approch is there
Thanks
Venkat
You can only add one button when you call the app.addToolButton method. You need to call it twice changing the parameters as needed for each specific button.
// add first button
app.addToolButton({
cName: "myButton1",
oIcon: iconStreamObj,
cExec: "app.alert('You have clicked the JavaScript toolbar button1.');",
cTooltext: "This is my button1",
nPos: 0
});
// add second button.
app.addToolButton({
cName: "myButton2",
oIcon: iconStreamObj,
cExec: "app.alert('You have clicked the JavaScript toolbar button2.');",
cTooltext: "This is my button2",
nPos: 0
});
Using the add button method as a document level script will create a floating button. It is a good practice to make sure you do not have duplicate tool bar buttons.
See Automating Placement of Annotations by Thom Parker
You need to create an application folder level script that uses a function with the priviliged operation. See the
Privileged versus non-privileged context and trustedFunction in the Acrobat JS API Reference.
hi,
app.addToolButton({
cName: "myButton1",
oIcon: iconStreamObj,
cExec: "app.alert('You have clicked the JavaScript toolbar button1.');",
cTooltext: "This is my button1",
nPos: 0
});
can we able to give border to (This is my button1),i want to show border for this button,how can give the border to this button in addtoolbutton().
can we able to write javascript funtion for parameters like cName,oIcon,cTooltext,.....if it is possible please give me some examples for this.
Thanks&Regards
Venkat
You can see all of the possible parameters for the addToolButton in the Acrobat JavaScript API Reference.
Open the Navigation panel to see all of the Acrobat JavaScript documentation.
North America
Europe, Middle East and Africa
Asia Pacific