summaryrefslogtreecommitdiff
path: root/support/acroreloadpdf/AcroReloadPDF.js
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /support/acroreloadpdf/AcroReloadPDF.js
Initial commit
Diffstat (limited to 'support/acroreloadpdf/AcroReloadPDF.js')
-rw-r--r--support/acroreloadpdf/AcroReloadPDF.js38
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
+});