forked from makkarlabs/badgeit
-
Notifications
You must be signed in to change notification settings - Fork 1
/
print.html
35 lines (31 loc) · 774 Bytes
/
print.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
<html>
<style>
body {
margin: 0px;
padding: 0px;
}
img {
padding: 1px;
}
</style>
<script src='resources/js/jquery.js'></script>
<script>
$(document).ready(function () {
//Image Dimensions
var dimensions = localStorage['dimensions'].split(",");
for(var j=0; j<dimensions.length; j++) { dimensions[j] = +dimensions[j]; }
function printsheet(i){
var url = 'filesystem:http://makkarlabs.in/temporary/svgs/badge_svg'+i+'.svg';
$("div").append("<span><img src ='" +url+ "'/></span>");
if(++i < localStorage['numentries'])
printsheet(i);
}
printsheet(1);
$('img').css({width:dimensions[2]*72+'pt', height:dimensions[3]*72+'pt'});
window.print();
});
</script>
<body>
<div id="print"></div>
</body>
</html>