Is it possible to add a reload button to Adobe Reader's toolbar?
Current Adobe Reader 9.4.2 allows you to press Ctrl+R to reload an opened PDF. However, there seems to be no way to add that functionality to the toolbar.
Do you know of any custom scripts that would allow me to add such a reload button?
adobe-acrobat adobe-reader
add a comment |
Current Adobe Reader 9.4.2 allows you to press Ctrl+R to reload an opened PDF. However, there seems to be no way to add that functionality to the toolbar.
Do you know of any custom scripts that would allow me to add such a reload button?
adobe-acrobat adobe-reader
add a comment |
Current Adobe Reader 9.4.2 allows you to press Ctrl+R to reload an opened PDF. However, there seems to be no way to add that functionality to the toolbar.
Do you know of any custom scripts that would allow me to add such a reload button?
adobe-acrobat adobe-reader
Current Adobe Reader 9.4.2 allows you to press Ctrl+R to reload an opened PDF. However, there seems to be no way to add that functionality to the toolbar.
Do you know of any custom scripts that would allow me to add such a reload button?
adobe-acrobat adobe-reader
adobe-acrobat adobe-reader
asked Aug 7 '11 at 7:53
htorquehtorque
1951315
1951315
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
I found the following JavaScript code via Google:
reloadCurrentDoc = app.trustedFunction(
function(currentDoc) {
app.beginPriv();
currentDocView=currentDoc.viewState;
currentDocPath=currentDoc.path;
currentDoc.closeDoc();
currentDoc=app.openDoc(currentDocPath);
currentDoc.viewState=currentDocView;
app.endPriv();
});
app.addMenuItem({
cName: "reloadCurDoc",
cUser: "Reload",
cParent: "File",
cExec: "reloadCurrentDoc(event.target);",
cEnable: "event.rc = (event.target != null);",
nPos: 0
});
app.addToolButton({
cName: "reloadCurDoc",
cExec: "reloadCurrentDoc(event.target);",
cToolText: "Reload the current document",
cEnable: "event.rc = (event.target != null);",
cLabel: "Reload ",
nPos: -1
});
I then saved this under ~/.adobe/Acrobat/9.0/JavaScripts/reloadButton.js
and now I get an additional toolbar containing a "Reload" button that does exactly what I need.
Things to improve:
- The toolbar pops up with a delay, not sure that can be fixed.
- You can reload without an open document -> NPE.
- The button is always added in a separate toolbar, I'd love to add it just to the other ones.
- The code also seems to add a menu item, I haven't yet checked if I can simply remove that part.
If you got any suggestions on how to improve this answer, please leave a comment.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f320038%2fis-it-possible-to-add-a-reload-button-to-adobe-readers-toolbar%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I found the following JavaScript code via Google:
reloadCurrentDoc = app.trustedFunction(
function(currentDoc) {
app.beginPriv();
currentDocView=currentDoc.viewState;
currentDocPath=currentDoc.path;
currentDoc.closeDoc();
currentDoc=app.openDoc(currentDocPath);
currentDoc.viewState=currentDocView;
app.endPriv();
});
app.addMenuItem({
cName: "reloadCurDoc",
cUser: "Reload",
cParent: "File",
cExec: "reloadCurrentDoc(event.target);",
cEnable: "event.rc = (event.target != null);",
nPos: 0
});
app.addToolButton({
cName: "reloadCurDoc",
cExec: "reloadCurrentDoc(event.target);",
cToolText: "Reload the current document",
cEnable: "event.rc = (event.target != null);",
cLabel: "Reload ",
nPos: -1
});
I then saved this under ~/.adobe/Acrobat/9.0/JavaScripts/reloadButton.js
and now I get an additional toolbar containing a "Reload" button that does exactly what I need.
Things to improve:
- The toolbar pops up with a delay, not sure that can be fixed.
- You can reload without an open document -> NPE.
- The button is always added in a separate toolbar, I'd love to add it just to the other ones.
- The code also seems to add a menu item, I haven't yet checked if I can simply remove that part.
If you got any suggestions on how to improve this answer, please leave a comment.
add a comment |
I found the following JavaScript code via Google:
reloadCurrentDoc = app.trustedFunction(
function(currentDoc) {
app.beginPriv();
currentDocView=currentDoc.viewState;
currentDocPath=currentDoc.path;
currentDoc.closeDoc();
currentDoc=app.openDoc(currentDocPath);
currentDoc.viewState=currentDocView;
app.endPriv();
});
app.addMenuItem({
cName: "reloadCurDoc",
cUser: "Reload",
cParent: "File",
cExec: "reloadCurrentDoc(event.target);",
cEnable: "event.rc = (event.target != null);",
nPos: 0
});
app.addToolButton({
cName: "reloadCurDoc",
cExec: "reloadCurrentDoc(event.target);",
cToolText: "Reload the current document",
cEnable: "event.rc = (event.target != null);",
cLabel: "Reload ",
nPos: -1
});
I then saved this under ~/.adobe/Acrobat/9.0/JavaScripts/reloadButton.js
and now I get an additional toolbar containing a "Reload" button that does exactly what I need.
Things to improve:
- The toolbar pops up with a delay, not sure that can be fixed.
- You can reload without an open document -> NPE.
- The button is always added in a separate toolbar, I'd love to add it just to the other ones.
- The code also seems to add a menu item, I haven't yet checked if I can simply remove that part.
If you got any suggestions on how to improve this answer, please leave a comment.
add a comment |
I found the following JavaScript code via Google:
reloadCurrentDoc = app.trustedFunction(
function(currentDoc) {
app.beginPriv();
currentDocView=currentDoc.viewState;
currentDocPath=currentDoc.path;
currentDoc.closeDoc();
currentDoc=app.openDoc(currentDocPath);
currentDoc.viewState=currentDocView;
app.endPriv();
});
app.addMenuItem({
cName: "reloadCurDoc",
cUser: "Reload",
cParent: "File",
cExec: "reloadCurrentDoc(event.target);",
cEnable: "event.rc = (event.target != null);",
nPos: 0
});
app.addToolButton({
cName: "reloadCurDoc",
cExec: "reloadCurrentDoc(event.target);",
cToolText: "Reload the current document",
cEnable: "event.rc = (event.target != null);",
cLabel: "Reload ",
nPos: -1
});
I then saved this under ~/.adobe/Acrobat/9.0/JavaScripts/reloadButton.js
and now I get an additional toolbar containing a "Reload" button that does exactly what I need.
Things to improve:
- The toolbar pops up with a delay, not sure that can be fixed.
- You can reload without an open document -> NPE.
- The button is always added in a separate toolbar, I'd love to add it just to the other ones.
- The code also seems to add a menu item, I haven't yet checked if I can simply remove that part.
If you got any suggestions on how to improve this answer, please leave a comment.
I found the following JavaScript code via Google:
reloadCurrentDoc = app.trustedFunction(
function(currentDoc) {
app.beginPriv();
currentDocView=currentDoc.viewState;
currentDocPath=currentDoc.path;
currentDoc.closeDoc();
currentDoc=app.openDoc(currentDocPath);
currentDoc.viewState=currentDocView;
app.endPriv();
});
app.addMenuItem({
cName: "reloadCurDoc",
cUser: "Reload",
cParent: "File",
cExec: "reloadCurrentDoc(event.target);",
cEnable: "event.rc = (event.target != null);",
nPos: 0
});
app.addToolButton({
cName: "reloadCurDoc",
cExec: "reloadCurrentDoc(event.target);",
cToolText: "Reload the current document",
cEnable: "event.rc = (event.target != null);",
cLabel: "Reload ",
nPos: -1
});
I then saved this under ~/.adobe/Acrobat/9.0/JavaScripts/reloadButton.js
and now I get an additional toolbar containing a "Reload" button that does exactly what I need.
Things to improve:
- The toolbar pops up with a delay, not sure that can be fixed.
- You can reload without an open document -> NPE.
- The button is always added in a separate toolbar, I'd love to add it just to the other ones.
- The code also seems to add a menu item, I haven't yet checked if I can simply remove that part.
If you got any suggestions on how to improve this answer, please leave a comment.
answered Aug 7 '11 at 11:07
htorquehtorque
1951315
1951315
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f320038%2fis-it-possible-to-add-a-reload-button-to-adobe-readers-toolbar%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown