-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
executable file
·63 lines (57 loc) · 2.04 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<!DOCTYPE html>
<html lang="en-US">
<head>
<title>Hello Accusoft PDF Viewer via CDN</title>
<!-- Prevent viewport scaling on mobile devices.
See https://developer.mozilla.org/en-US/docs/Web/HTML/Viewport_meta_tag -->
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
<style>
/* Force the body height to the size of the browser. */
html,
body {
height: 100%;
}
/* Size the viewer as desired. In this case, we fill the browser window. */
#viewer-container {
height: 100%;
}
</style>
<!-- Import the @accusoft/pdf-viewer bundle.js from an npm CDN mirror.
Adding this bundle.js makes window.Accusoft.PdfViewerControl available. -->
<script src="https://cdn.jsdelivr.net/npm/@accusoft/pdf-viewer@3/bundle.js"></script>
</head>
<body>
<!-- Define a container where the viewer will go. -->
<div id="viewer-container"></div>
<script>
// Create the viewer:
(async () => {
await window.Accusoft.PdfViewerControl.create({
sourceDocument: 'example.pdf',
container: document.getElementById('viewer-container'),
// Evaluation of all features:
licenseKey: 'eval',
allowedControls: {
// Enable or disable annotation tools (all false by default):
annotationList: true,
ellipseTool: true,
freehandDrawingTool: true,
freehandSignatureTool: true,
lineTool: true,
outline: true,
rectangleTool: true,
textHighlightTool: true,
// Enable or disable other parts of the UI (all true by default):
fullScreenToggle: true,
nextAndPreviousPageButtons: true,
pageNumberAndCount: true,
printing: true,
search: true,
thumbnails: true,
zoomInAndOutButtons: true
}
});
})();
</script>
</body>
</html>