printImage.jsp
2.27 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
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<title>测试管理</title>
<meta name="decorator" content="default" />
<script type="text/javascript"
src="${ctxStatic}/jquery.print/jQuery.print.js"></script>
<script type="text/javascript">
$(document).ready(function() {
});
function print_image(){
$("#form-member-add").print({
//Use Global styles
globalStyles : false,
//Add link with attrbute media=print
// mediaPrint : false,
//Custom stylesheet
stylesheet : "${ctxStatic}/jquery.print/payplan.css",
//Print in a hidden iframe
// iframe : false,
//Don't print this
// noPrintSelector : ".avoid-this",
//Add this at top
//prepend : "<label class='print_title'>付款计划<label>",
//Add this on bottom
append : "",
//Log to console when printing is done via a deffered callback
deferred: $.Deferred().done(function() { console.log('Printing done', arguments); })
});
}
</script>
<style type="text/css">
.bg_div_print {
width: 210mm;
height: 297mm;
display: block;
text-align: center;
padding: 0;
margin: 0;
max-height:
}
</style>
</head>
<body>
<!--
<div style="display: block;text-align: center;width: 98%;padding:5px;margin:5px;border-width: 2mm;border-style:solid;" id="form-member-add">
<img style="width: 210mm;height: 297mm;position: absolute;top:0px;left: 0px;z-index:-1;" src="/ODM/userfiles/A4.png">
-->
<div id="form-member-add">
<div style="width: 210mm;height: 295mm;display: block;text-align: center;padding: 5mm 0 0 0;margin: 0;border-width: 0.01mm;border-style:solid;" >
<div style=" height: ${zdHeight}mm; ">
<img alt="宗地图" src="${zdimgname}" style="max-height:${zdHeight}mm;max-width: 205mm;">
</div>
<div style="height: ${fwHeight}mm;">
<img alt="房屋图" src="${fwimgname}" style="max-height:${fwHeight}mm;max-width: 205mm;">
</div>
</div>
</div>
<div class="btn-toolbar breadcrumb no-print">
<div class="btn-group">
<a class="btn" href="javascript:print_image();"><i
class="icon-print"></i> 打印</a>
</div>
</div>
</body>
</html>