68 lines
2.4 KiB
HTML
68 lines
2.4 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<script>
|
|
if (window.location.href.slice(-1) !== '/' && window.location.href.slice(-4) !== 'html') {
|
|
// hacky redirect for mac php server...
|
|
window.location = window.location.href + '/';
|
|
}
|
|
</script>
|
|
<link rel="stylesheet" href="./style.css" />
|
|
<title>JavaScript PDF Viewer Demo & Samples</title>
|
|
</head>
|
|
|
|
<body class="pdfjs">
|
|
<header>
|
|
<div class="container">
|
|
<div>
|
|
<a href="https://pdftron.com" target="_blank">
|
|
<div class="logo"></div>
|
|
</a>
|
|
<span class="title">PDFJS Express</span>
|
|
</div>
|
|
<div>
|
|
<a class="button" href="https://pdfjs.express/documentation/get-started/overview" target="_blank">Go to Guides</a>
|
|
<a class="button filled" href="https://pdfjs.express/purchase" target="_blank">Purchase</a>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
<section>
|
|
<div class="sidebar">
|
|
<p><b>Samples</b></p>
|
|
|
|
<p><a class="active" href=".">Viewing</a></p>
|
|
<p><a class="" href="./annotation">Annotation</a></p>
|
|
<p><a class="" href="./forms">Forms</a></p>
|
|
<p><a class="" href="./customization">Customization</a></p>
|
|
<p><a class="" href="./advanced">Advanced</a></p>
|
|
|
|
<p><b>Showcase</b></p>
|
|
<p><a href="https://pdfjs.express/demo" target="_blank">Go to showcase</a></p>
|
|
</div>
|
|
<div class="content">
|
|
<div id="error-message" style="display: none; background-color: red; color: white">Samples are not runnable from the file system. Please run using "npm start" or use a local web server.</div>
|
|
|
|
<h1>PDF Viewer Samples & Demo</h1>
|
|
|
|
<div>
|
|
<h4>Viewing</h4>
|
|
<p>
|
|
Shows how to call WebViewer constructor to instantiate and load document. You can load local/remote files of your choice.
|
|
<br />
|
|
</p>
|
|
<div class="inline">
|
|
<a href="./viewing/viewing">Launch demo</a>
|
|
<a href="./viewing/viewing/viewing.js" target="_self">View Source</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<script>
|
|
if (window.location.href.indexOf('file://') === 0) {
|
|
alert('Samples are not runnable from the file system. Please run using "npm start" or use a local web server.');
|
|
document.getElementById('error-message').style.display = 'block';
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|