<html> <head> <title>Simple pdf.js page viewer</title> <link rel="stylesheet" href="viewer.css"></link> <script type="text/javascript" src="viewer.js"></script> <script type="text/javascript" src="pdf.js"></script> <script type="text/javascript" src="fonts.js"></script> <script type="text/javascript" src="glyphlist.js"></script> </head> <body onload="load();"> <div id="controls"> <input type="file" style="float: right; margin: auto 32px;" onChange="load(this.value.toString());"></input> <!-- This only opens supported PDFs from the source path... -- Can we use JSONP to overcome the same-origin restrictions? --> <button onclick="prevPage();">Previous</button> <button onclick="nextPage();">Next</button> <input type="text" id="pageNumber" onchange="gotoPage(this.value);" value="1" size="4"></input> <span id="numPages">--</span> <span id="info"></span> </div> <div id="viewer"> <!-- Canvas dimensions must be specified in CSS pixels. CSS pixels are always 96 dpi. 816x1056 is 8.5x11in at 96dpi. --> <!-- We're rendering here at 1.5x scale. --> <canvas id="canvas" width="1224" height="1584"></canvas> </div> </body> </html>