pdf.js/test.html

35 lines
1.4 KiB
HTML
Raw Normal View History

<html>
<head>
<title>Simple pdf.js page viewer</title>
<link rel="stylesheet" href="test.css"></link>
<script type="text/javascript" src="test.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>
<script type="text/javascript" src="cffStandardStrings.js"></script>
<script type="text/javascript" src="Encodings.js"></script>
2011-06-17 16:11:03 +09:00
<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>
2011-06-14 02:16:03 +09:00
<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. These dimensions are 8.5x11in at 96dpi. -->
<canvas id="canvas" width="816" height="1056"></canvas>
</div>
</body>
</html>