diff options
Diffstat (limited to 'support/acroreloadpdf/AcroReloadPDF.js')
-rw-r--r-- | support/acroreloadpdf/AcroReloadPDF.js | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/support/acroreloadpdf/AcroReloadPDF.js b/support/acroreloadpdf/AcroReloadPDF.js new file mode 100644 index 0000000000..b79204c68e --- /dev/null +++ b/support/acroreloadpdf/AcroReloadPDF.js @@ -0,0 +1,38 @@ +//////////////////////////////////////////////////////////////////////// +// +// AcroReloadPDF.js, version 20090202 +// +// * folder level JavaScript, to be put to: +// +// $HOME/.adobe/Acrobat/8.0/JavaScripts +// (version number might need to be adjusted) +// +// * adds item ``Reload'' to the ``File'' menu of Adobe Reader +// * reloads the current document and restores page number and zoom +// state +// +// Alexander Grahn, 2009 +// +// This material is in the Public Domain. +// +//////////////////////////////////////////////////////////////////////// + +reloadCurrentDoc=app.trustedFunction(function(currentDoc){ + app.beginPriv(); + var currentDocView=currentDoc.viewState; + var currentDocPath=currentDoc.path; + currentDoc.closeDoc(); + currentDoc=app.openDoc(currentDocPath); + currentDoc.viewState=currentDocView; + app.endPriv(); +}); + +app.addMenuItem({ + cName: "reloadCurDoc", + cUser: "Reloa&d", + cParent: "File", + cExec: "reloadCurrentDoc(event.target);", + cEnable: "event.rc = (event.target != null);", + nPos: "Open", + bPrepend: true +}); |