From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- support/acroreloadpdf/AcroReloadPDF.js | 38 ++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 support/acroreloadpdf/AcroReloadPDF.js (limited to 'support/acroreloadpdf/AcroReloadPDF.js') 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 +}); -- cgit v1.2.3