80 lines
2.8 KiB
HTML
80 lines
2.8 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>Customization Demo & Samples for JavaScript PDF Viewer</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="" href="../">Viewing</a></p>
|
|
<p><a class="" href="../annotation">Annotation</a></p>
|
|
<p><a class="" href="../forms">Forms</a></p>
|
|
<p><a class="active" href=".">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>Demo to Customize PDF Viewer</h1>
|
|
|
|
<div>
|
|
<h4>Internationalization</h4>
|
|
<p>
|
|
Shows how to switch language.
|
|
<br />
|
|
</p>
|
|
<div class="inline">
|
|
<a href="./internationalization">Launch demo</a>
|
|
<a href="./internationalization/internationalization.js" target="_self">View Source</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div>
|
|
<h4>Customizing UI</h4>
|
|
<p>
|
|
Shows how to customize the UI using WebViewer APIs. Includes modifying header, enabling/disabling features and hiding/showing individual elements.
|
|
<br />
|
|
</p>
|
|
<div class="inline">
|
|
<a href="./ui">Launch demo</a>
|
|
<a href="./ui/ui.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>
|