forked from justindarc/bootstrap-pdf-viewer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathform-viewer.html
62 lines (51 loc) · 2.21 KB
/
form-viewer.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
<!DOCTYPE html>
<!--[if IEMobile 7 ]> <html class="no-js iem7"> <![endif]-->
<!--[if (gt IEMobile 7)|!(IEMobile)]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<title>Bootstrap PDF Form Viewer</title>
<meta name="description" content="">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta http-equiv="cleartype" content="on">
<!-- For iOS web apps. Delete if not needed. https://github.com/h5bp/mobile-boilerplate/issues/94 -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="">
<!-- Twitter Bootstrap -->
<link rel="stylesheet" href="lib/twitter-bootstrap/css/bootstrap.css">
<!-- Font Awesome -->
<link rel="stylesheet" href="lib/font-awesome/css/font-awesome.css">
<!-- Bootstrap PDF Viewer -->
<link rel="stylesheet" href="css/bootstrap-pdf-viewer.css">
<link rel="stylesheet" href="css/bootstrap-pdf-form-viewer.css">
</head>
<body>
<!-- Bootstrap PDF Viewer -->
<div id="viewer" class="pdf-viewer" data-url="form.pdf"></div>
<!-- jQuery -->
<script src="lib/jquery-1.9.1.js"></script>
<!-- Twitter Bootstrap -->
<script src="lib/twitter-bootstrap/js/bootstrap.js"></script>
<!-- Bootstrap PDF Viewer -->
<script src="lib/pdf.js"></script>
<script src="js/bootstrap-pdf-viewer.js"></script>
<script src="js/bootstrap-pdf-form-viewer.js"></script>
<script src="js/bootstrap-pdf-form-common.js"></script>
<script>
var viewer, formViewer;
$(function() {
viewer = new PDFViewer($('#viewer'));
formViewer = new PDFFormViewer(viewer, {
hideOpenFormButton: false, // Default: false
hideOpenDataButton: false, // Default: false
hideSaveDataButton: false // Default: false
});
formViewer.setToolbarAction('#save-data', function() {
console.log(this.serializeValues());
});
});
</script>
</body>
</html>