User Tools

Site Tools


acroread:acroread

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

acroread:acroread [2009/07/07 15:44] – created viktorhacroread:acroread [2009/07/07 15:51] (current) – layout modified viktorh
Line 1: Line 1:
-Here is a slick method to do it through Javascript on Linux. Create a new text file called (for instance) reload.js and put it into the directory:+  * Here is a slick method to do it through Javascript on Linux. Create a new text file called (for instance) reload.js and put it into the directory:
  
-~/.adobe/Acrobat/8.0/JavaScripts/+     ~/.adobe/Acrobat/8.0/JavaScripts/
  
-In the text file write these lines:+  *  In the text file write these lines:
  
-reloadCurrentDoc = app.trustedFunction( +     reloadCurrentDoc = app.trustedFunction( 
-function(currentDoc) { +     function(currentDoc) { 
-app.beginPriv(); +     app.beginPriv(); 
-currentDocView=currentDoc.viewState; +     currentDocView=currentDoc.viewState; 
-currentDocPath=currentDoc.path; +     currentDocPath=currentDoc.path; 
-currentDoc.closeDoc(); +     currentDoc.closeDoc(); 
-currentDoc=app.openDoc(currentDocPath); +     currentDoc=app.openDoc(currentDocPath); 
-currentDoc.viewState=currentDocView; +     currentDoc.viewState=currentDocView; 
-app.endPriv(); +     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 
 +     });
  
-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 
-}); 
  
-Close and open Acrobat. A toolbox item called 'Reload' appears and a corresponding menu item in the 'File' menu is added.+  * Close and open Acrobat. A toolbox item called 'Reload' appears and a corresponding menu item in the 'File' menu is added.
  
-NOTE: On Ubuntu, remember to install the acrobat-plugins package from the medibuntu repository.+  * NOTE: On Ubuntu, remember to install the acrobat-plugins package from the medibuntu repository.
  
-Credit to Alexander Grahn for the idea +  * Credit to Alexander Grahn for the idea http://www.tug.org/pipermail/pdftex/2009-January/007934.html 
-http://www.tug.org/pipermail/pdftex/2009-January/007934.html +
acroread/acroread.1246974278.txt.gz · Last modified: 2009/07/07 15:44 by viktorh