forked from parallax/jsPDF
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlists.html
More file actions
75 lines (68 loc) · 2.19 KB
/
Copy pathlists.html
File metadata and controls
75 lines (68 loc) · 2.19 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
<!DOCTYPE html>
<html>
<head>
<title>Html2Pdf</title>
<link rel="stylesheet" type="text/css" href="examples.css">
<style>
</style>
</head>
<body>
<div style='position: absolute'>
<h1>Ordered And Unordered Lists</h1>
<h2>Implemented</h2>
<ol>
<li>OL Item (default)</li>
<li style='list-style-type: decimal'>OL Item (decimal)</li>
<li style='list-style-type: upper-alpha'>OL Item (upper-alpha)</li>
<li style='list-style-type: lower-alpha'>OL Item (lower-alpha)</li>
<li style='list-style-type: upper-roman'>OL Item (upper-roman)</li>
<li style='list-style-type: lower-roman'>OL Item (lower-roman)</li>
<li style='list-style-type: none'>OL Item (none)</li>
</ol>
<ul>
<li>UL Item (default)</li>
<li style='list-style-type: circle'>UL Item (circle)</li>
<li style='list-style-type: square'>UL Item (square)</li>
<li style='list-style-type: disc'>UL Item (disc)</li>
<li style='list-style-type: none'>OL Item (none)</li>
</ul>
<h2>Not Implemented</h2>
<pre>
upper-latin
lower-latin
armenian
cjk-ideographic
decimal-leading-zero
georgian
hebrew
hiragana
hiragana-iroha
katakana
katakana-iroha
</pre>
</div>
<script src='../../libs/require/require.js'></script>
<script>
require_baseUrl_override = '../..';
require(['../../libs/require/config'], function(){
require(['html2pdf'], function(){
var pdf = new jsPDF('p', 'pt', 'letter');
var canvas = pdf.canvas;
canvas.height = 72 * 11;
canvas.width=72 * 8.5;;
// var width = 400;
html2pdf(document.body, pdf, function(canvas) {
var iframe = document.createElement('iframe');
iframe.setAttribute('style','position:absolute;right:0; top:0; bottom:0; height:100%; width:500px');
document.body.appendChild(iframe);
iframe.src = pdf.output('datauristring');
//var div = document.createElement('pre');
//div.innerText=pdf.output();
//document.body.appendChild(div);
}
);
}); // require
}); // require
</script>
</body>
</html>