2011-05-05 09:32:59 +09:00
|
|
|
<html>
|
2011-05-26 23:02:52 +09:00
|
|
|
<head>
|
|
|
|
<title>Simple pdf.js page viewer</title>
|
2011-06-18 08:20:13 +09:00
|
|
|
<link rel="stylesheet" href="viewer.css"></link>
|
2011-05-26 23:02:52 +09:00
|
|
|
|
2011-06-18 08:20:13 +09:00
|
|
|
<script type="text/javascript" src="viewer.js"></script>
|
2011-06-17 16:11:03 +09:00
|
|
|
<script type="text/javascript" src="pdf.js"></script>
|
|
|
|
<script type="text/javascript" src="fonts.js"></script>
|
2011-06-25 12:17:57 +09:00
|
|
|
<script type="text/javascript" src="crypto.js"></script>
|
2011-06-17 16:11:03 +09:00
|
|
|
<script type="text/javascript" src="glyphlist.js"></script>
|
2011-05-26 23:02:52 +09:00
|
|
|
</head>
|
|
|
|
|
|
|
|
<body onload="load();">
|
|
|
|
<div id="controls">
|
2011-06-16 15:44:02 +09:00
|
|
|
<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? -->
|
2011-05-26 23:02:52 +09:00
|
|
|
<button onclick="prevPage();">Previous</button>
|
|
|
|
<button onclick="nextPage();">Next</button>
|
|
|
|
<input type="text" id="pageNumber" onchange="gotoPage(this.value);"
|
|
|
|
value="1" size="4"></input>
|
2011-06-14 02:16:03 +09:00
|
|
|
<span id="numPages">--</span>
|
2011-05-26 23:02:52 +09:00
|
|
|
<span id="info"></span>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="viewer">
|
|
|
|
<!-- Canvas dimensions must be specified in CSS pixels. CSS pixels
|
2011-06-17 17:19:59 +09:00
|
|
|
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>
|
2011-05-26 23:02:52 +09:00
|
|
|
</div>
|
|
|
|
</body>
|
2011-05-05 09:32:59 +09:00
|
|
|
</html>
|
2011-05-26 23:02:52 +09:00
|
|
|
|