title: Google Drive Doc Viewer - Use javascript to scroll and zoom document
body: <p><a href="https://docs.google.com/file/d/0B5cRH_G6kDjbUndHVzJDRDE3ekk/preview" rel="nofollow noreferrer">Here is a link</a> to a document of mine in Google Drive/Docs. What I'd like to be able to do is scroll around that document (up/down/left/right) and also to zoom in and out (without using the mouse to press the zoom in/out buttons or the scroll bar buttons). Preferably by passing in a Javascript command like <code>window.scrollBy(x,y);</code> which works fine on normal HTML pages but not on the above page because the PDF document is inside an iframe. I've tried scrolling the iframe too but it doesn't work because the scrolling is not handled by the iframe. It's handled by a component <em>inside</em> the iframe.</p>
  
  <p><strong>Environment</strong>: I'm using Java 1.6 to write a Windows7-based application. I'm using an embedded Java web browser called JWebBrowser (a very convenient utility that's part of the <a href="http://djproject.sourceforge.net/ns/" rel="nofollow noreferrer">DJ Native Swing package</a>). JWebBrowser has a method to execute a Javascript command given as a string. This works for me to scroll normal HTML pages.</p>
  
  <p><strong>Background</strong>: I'm making an application to allow people with physical disabilities to access a computer without using the standard keyboard &amp; mouse. The user only has very limited physical input options - In some cases, just one or two buttons/switches. This is why the existing zoom and scroll buttons are of no use to me. Below is a screenshot of my program. The user navigates the options on the left by pressing a <em>move</em> button and picks one by pressing a <em>select</em> button. By the way, I'm using Google Drive as a viewer for email attachments. This screenshot shows one such attachment.</p>
  
  <p><img src="https://i.stack.imgur.com/cyTXf.jpg" alt="enter image description here"></p>
  
  <p>If anybody has any suggestions for an entirely different online document viewer that better suits my needs and can be used to display PDFs, spreadsheets, Word Docs, etc., please let me know!</p>
  
  <p>Thanks.</p>