John John - 4 years ago 70
Javascript Question

Javascript won't change pages in PDF or Zoom

I'm using Windows 10 and I have a file called

on my Desktop.

The contents of

<!DOCTYPE html>
<script type="text/javascript">

function goAndZoom(pageNum,zoom)
var pdf = document.getElementById('pdf'); ='#page='+pageNum+'&zoom='+zoom;
<button onclick="goAndZoom(4,300);">Go to Page 4 and zoom 300%</button>
<object id="pdf" data="" width="100%" height="700px" type="application/pdf">
<param name="zoom" value="100" />


I open this file in Chrome. When I press the button "Go to page 4 and zoom 300%", the embedded pdf will go to page 4 and zoom 300%. When I repeat these two actions in Edge browser, the pdf stays on page 1 without altering the zoom. I have shared this
file with other people and they reported the same problem when using IE 11.

How do I get the
function to go to a page in a PDF and zoom in IE and Edge?

Answer Source

No solution exists as of April 27, 2016

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download