
The CodeCopy one of the following scripts into a file called
open_new_view.js and put it in your Acrobat or Reader
JavaScripts directory. Choose the code block
that suits your default browser. explains where to find the
JavaScripts directory on your platform. Restart
Acrobat/Reader, and open_new_view.js will add a
new item to your View menu. The script in is for Mozilla users and
opens the PDF to the current page. The script in is for Internet Explorer users and opens the
PDF to the first page. Example 1. open_new_view.moz.js// open_new_view.moz.js ver. 1.0 (for Mozilla users)
//
app.addMenuItem( {
cName: "-", // menu divider
cParent: "View", // append to the View menu
cExec: "void(0);" } );
//
app.addMenuItem( {
cName: "Open New View &3", // shortcut will be: ALT-V, 3
cParent: "View",
cExec: "this.getURL( this.URL+ '#page='+ (this.pageNum+1), false );",
cEnable: "event.rc= (event.target != null);" } );
Example 2. open_new_view.ie.js// open_new_view.ie.js ver 1.0 (for Internet Explorer users)
//
app.addMenuItem( {
cName: "-", // menu divider
cParent: "View", // append to the View menu
cExec: "void(0);" } );
//
app.addMenuItem( {
cName: "Open New View &3", // shortcut will be: ALT-V, 3
cParent: "View",
cExec: "this.getURL( this.URL, false );",
cEnable: "event.rc= (event.target != null);" } );
You can download these JavaScripts from http://www.pdfhacks.com/open_new_view/.
|
O'Reilly Home | Privacy Policy

© 2007 O'Reilly Media, Inc.
Website:
| Customer Service:
| Book issues:
All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.
|
|