mirror of
https://github.com/hanzoai/jube-fork.git
synced 2026-11-02 09:25:40 +00:00
97 lines
2.7 KiB
HTML
Executable File
97 lines
2.7 KiB
HTML
Executable File
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>API</title>
|
|
<meta charset="utf-8">
|
|
<link href="../content/shared/styles/examples-offline.css" rel="stylesheet">
|
|
<link href="../../styles/kendo.common.min.css" rel="stylesheet">
|
|
<link href="../../styles/kendo.rtl.min.css" rel="stylesheet">
|
|
<link href="../../styles/kendo.default.min.css" rel="stylesheet">
|
|
<link href="../../styles/kendo.default.mobile.min.css" rel="stylesheet">
|
|
<script src="../../js/jquery.min.js"></script>
|
|
<script src="../../js/jszip.min.js"></script>
|
|
<script src="../../js/kendo.all.min.js"></script>
|
|
<script src="../content/shared/js/console.js"></script>
|
|
<script>
|
|
|
|
</script>
|
|
|
|
|
|
</head>
|
|
<body>
|
|
|
|
<a class="offline-button" href="../index.html">Back</a>
|
|
|
|
<div class="configurator">
|
|
<div class="header">Configurator</div>
|
|
<div class="box-col">
|
|
<h4>Load File</h4>
|
|
<ul class="options">
|
|
<li>
|
|
<button id="loadFile" type="button">Load</button>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="box-col">
|
|
<h4>Change page</h4>
|
|
<ul class="options">
|
|
<li>
|
|
<input id="numeric" type="number" title="numeric" value="17" min="1" max="3" step="1" style="width: 100%;" />
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="example">
|
|
<div id="pdfViewer">
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
$.when(
|
|
$.getScript("https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.js"),
|
|
$.getScript("https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.worker.js")
|
|
)
|
|
.done(function () {
|
|
window.pdfjsLib.GlobalWorkerOptions.workerSrc = 'https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.worker.js';
|
|
}).then(function () {
|
|
var numeric = $("#numeric").kendoNumericTextBox({
|
|
change: onChange,
|
|
spin: onSpin,
|
|
format: "n0",
|
|
value: 1
|
|
}).data("kendoNumericTextBox");
|
|
|
|
var pdfViewer = $("#pdfViewer").kendoPDFViewer({
|
|
pdfjsProcessing: {
|
|
file: "../content/web/pdfViewer/sample.pdf"
|
|
},
|
|
width: "100%",
|
|
height: 700
|
|
}).data("kendoPDFViewer");
|
|
|
|
$("#loadFile").click(function () {
|
|
pdfViewer.fromFile("../content/web/pdfViewer/How Does Kendo UI Cut Development Time.pdf")
|
|
});
|
|
|
|
function onChange(e) {
|
|
var value = this.value();
|
|
changePdfViewerPage(value)
|
|
}
|
|
|
|
function onSpin(e) {
|
|
var value = this.value();
|
|
changePdfViewerPage(value)
|
|
}
|
|
|
|
function changePdfViewerPage(value) {
|
|
pdfViewer.activatePage(value);
|
|
}
|
|
});
|
|
</script>
|
|
|
|
|
|
|
|
</body>
|
|
</html>
|