forked from parallax/jsPDF
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsimple.html
More file actions
27 lines (23 loc) · 829 Bytes
/
Copy pathsimple.html
File metadata and controls
27 lines (23 loc) · 829 Bytes
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
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>html2pdf Simple Example</title>
</head>
<body>
</body>
</html>
<script src='../../dist/jspdf.debug.js'></script>
<script src='../../libs/html2pdf.js'></script>
<script>
var pdf = new jsPDF('p', 'pt', 'letter');
var canvas = pdf.canvas;
canvas.height = 72 * 11;
canvas.width= 72 * 8.5;;
// can also be document.body
var html = '<html><body>Hello <strong> World</strong></body></html>';
html2pdf(html, pdf, function(pdf) {
pdf.output('dataurlnewwindow');
});
</script>