Thanks.
Gwyl
you can add menu items via javascript using the app.addMenuItem method, but it does not seem that you can add toolbar buttons
If you want to add a menu item try the following;
create a text file in your My Documents\Adobe\Acrobat\Javascripts folder, callit what you like, but make sure the file extension is changed to '.js' (e.g. myscript.js)
Edit this file in notepad, and add the following code;
function merge() {
var evenFile = app.response({ cQuestion: "Please enter the \"Even File\" (e.g. C:\\My Documents\\Even.pdf). ", cTitle:
"Even File"});
var oddPages = this.numPages
try {
for (i=0; i<oddPages; i++) {
this.insertPages((i*2),evenFile,i);
}
}
catch(e) {
app.alert(e);
}
}
function reversemerge() {
var evenFile = app.response({ cQuestion: "Please enter the \"Even File\" (e.g. C:\\My Documents\\Even.pdf). ", cTitle:
"Even File"});
var oddPages = this.numPages
try {
for (i=0; i<oddPages; i++) {
this.insertPages((i*2),evenFile,(oddPages-i-1));
}
}
catch(e) {
app.alert(e);
}
}
app.addSubMenu({ cName: "Merge", cParent: "Document", nPos: 0});
app.addMenuItem({ cName: "Merge odd and even pages...", cParent: "HTT extras",
cExec: "merge();"});
app.addMenuItem({ cName: "Reverse merge odd and even pages...", cParent: "HTT extras",
cExec: "reversemerge();"});
Save the file, and restart Acrobat
This will add a new menu below the 'Document' menu called 'Merge' In this menu are two options for merging the odd and even scans of a double sided document. You should be able to modify my code to do what you want.
P.S. this is all for Acrobat 5, not tested yet in 6.0
Gwyl