printImage.jsp 2.27 KB
<%@ 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>&nbsp;打印</a>
		</div>
	</div>
</body>
</html>