How to add a button to quick bar.
The title is a bit confusing so let me elaborate here.
My Goal -> On opening a PDF my users are supposed to have my button on their (ideally) Quick Tools Bar.
The button will have it's own script which will create a custom stamp (I got that part figured out) but I just can't get it to have an Icon from the start when opening the PDF. I would like this to happen on a Folder-Level Script.
My code is failing on the part where it has to import an icon:
CODE:
function insertStamp(){
this.addAnnot({
page: 0,
type: "Stamp",
author: "Author",
name: "myStamp",
rect: [400, 400, 550, 500],
AP: "SBConfidential",
lock: false
});
}
importIcon("myIcon", "/C/Users/Me/Desktop/ICON.png");
var my_oIcon = util.iconStreamFromIcon(myDoc.getIcon('myIcon'));
app.addToolButton({
cName: "unique",
oIcon: my_oIcon,
cExec: "insertStamp",
cTooltext: "Insert Stamp",
cEnable: true,
nPos: 0,
cLabel: "Insert Stamp"
});
RESULT:
ReferenceError: importIcon is not defined
13:Folder-Level:App:Stamp.js
I would be thankful for any solutions, documentations, samples and knowledge you guys could pass on. Just started trying to code a bit of acrobat.
