<%@ page contentType="text/html; charset=UTF-8"%><%@taglib prefix="s" uri="/struts-tags"%><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><!-- 插入列印控制項 --><OBJECT ID="jatoolsPrinter" CLASSID="CLSID:B43D3361-D975-4BE2-87FE-057188254255" codebase="${pageContext.request.contextPath}/print/jatoolsP.cab#version=1,2,0,6"></OBJECT> <title>王明傑製作的套打示範</title><style><!--*{-moz-box-sizing: border-box;}.title { font-family : Arial,Vernada,Tahoma, sans-serif; font-size: 30px; color : #00008B; background-color : White; text-decoration:underline}.normal{font-family : Arial,Vernada, Tahoma, Helvetica, sans-serif;font-size: 12px;color: #444444;text-decoration: none;line-height: 21px;}.hide_for_jatools_print{}.jc{position:absolute;overflow:hidden}.jnc{position:absolute}.pb{overflow:hidden;position:relative;margin:5;width:700;height:400;background-color:white;border-left:1px solid black;border-top:1px solid black;border-right:4px solid black;border-bottom:4px solid black;}.c12{margin-left:2px;margin-bottom:-2px;font-family: 宋體;font-size: 24px;font-weight: bold;color: #FF0000}.c9, .c8, .c6, .c5, .c4, .c3, .c0{margin-left:2px;margin-bottom:-2px;font-family: 宋體;font-size: 12px;}.c2{margin-left:2px;margin-bottom:-2px;font-family: 宋體;font-size: 12px;}.c7{margin-left:2px;margin-bottom:-2px;text-align: right;font-family: 宋體;font-size: 12px;}.c11, .c10, .c1{margin-left:2px;margin-bottom:-2px;text-align: right;font-family: 宋體;font-size: 12px;}--></style><script>function doPrint(how){ if(typeof(jatoolsPrinter.page_div_prefix)=='undefined'){ alert("請按頁頂上的黃色提示下載ActiveX控制項.如果沒有提示請按以下步驟設定ie./n
工具-> internet 選項->安全->自訂層級,設定 ‘下載未簽名的 ActiveX ’為'啟用'狀態") return ; }//列印文檔對象 //var myreport ={ //documents: document, // 列印頁面(div)們在本文檔中 //copyrights : '傑創軟體擁有著作權 www.jatools.com' // 著作權聲明必須 // };myreport = new Object();myreport.print_settings = new Object();myreport.print_settings.printer="Microsoft Office Document Image Writer";myreport.print_settings.pageWidth=2970;myreport.print_settings.pageHeight=2100;myreport.print_settings.orientation=2;//橫向myreport.print_settings_id="mysettings";//myreport.page_div_prefix="report1";myreport.documents =document; // 列印頁面div存在本頁面中 //下面的語句事項批量列印。// myreport.documents = new Array(document, // 列印頁面(div)們在正顯示在本文檔中// 'append1.htm', // 列印頁面(div)們在一個url指定的文檔中 // 'append2.htm'); // 調用列印方法 if(how == '預覽列印...') jatoolsPrinter.printPreview(myreport ); // 預覽列印 else if(how == '列印...') jatoolsPrinter.print(myreport ,true); // 列印前彈出列印設定對話方塊 else jatoolsPrinter.print(myreport ,false); // 不彈出對話方塊列印}</script> <script>function doPrint2(){myreport = new Object();myreport.print_settings = new Object();myreport.print_settings.printer="Microsoft Office Document Image Writer";myreport.print_settings.pageWidth=2970;myreport.print_settings.pageHeight=2100;myreport.print_settings.orientation=2;myreport.print_settings_id="mysettings";//myreport.page_div_prefix="report1";myreport.documents =document; // 列印頁面div存在本頁面中myreport.save_print_settings_after_print=true;myreport.copyrights ="傑創軟體擁有著作權 www.jatools.com"; jatoolsPrinter.print(myreport,false); // 直接列印,不彈出印表機設定對話方塊 } </script></head><body ><p class="title">僅在預覽時可見,不輸出到印表機的套打底圖</p><div style='background-color:#808080;width:730;height:440;overflow:scroll;'> <div id="page_1" class="pb" > <div id="page1"> <div class="jnc" style="left:0; top:0;clip:rect(0,700,400,0)">
<span class="jnc" style="left:0; top:0;clip:rect(0,700,400,0)">
<span class="jnc" style="left:0; top:0;clip:rect(0,700,400,0)">
<span class="jnc" style="left:0; top:0;clip:rect(0,700,400,0)">
<img class='hide_for_jatools_print' src="xinfeng.jpg" width="700" height="400">
</span></span></span></div>
<div class="jc" style="left:70px; top:75px; width:213;height:20"> <p class="c0" style="margin-top:4px;">深圳新業軟體有限公司</p> </div> <div class="jc" style="left:401px; top:287px; width:147;height:20"> <p class="c3" style="margin-top:4px;">423051702880563</p> </div> <div class="jc" style="left:78px; top:255px; width:153;height:40"> <p class="c4" style="margin-top:4px;"><input style=" background-color:#FFFFFF;
border-color: #FFFFFF" name="fxrdz" value="杭州基因生物工程公司" /></p> </div> <div class="jc" style="left:508px; top:25px; width:15;height:20"> <p class="c7" style="margin-top:4px;">5</p> </div> <div class="jc" style="left:535px; top:25px; width:15;height:20"> <p class="c7" style="margin-top:4px;">8</p> </div> <div class="jc" style="left:570px; top:25px; width:15;height:20"> <p class="c7" style="margin-top:4px;">0</p> </div> <div class="jc" style="left:595px; top:25px; width:15;height:20"> <p class="c7" style="margin-top:4px;">0</p> </div> <div class="jc" style="left:627px; top:25px; width:15;height:20"> <p class="c7" style="margin-top:4px;">0</p> </div> <div class="jc" style="left:656px; top:25px; width:15;height:20"> <p class="c7" style="margin-top:4px;">0</p> </div> <div class="jc" style="left:529px; top:366px; width:15;height:20"> <p class="c7" style="margin-top:4px;">6</p> </div> <div class="jc" style="left:559px; top:365px; width:15;height:20"> <p class="c7" style="margin-top:4px;">5</p> </div> <div class="jc" style="left:589px; top:365px; width:15;height:20"> <p class="c7" style="margin-top:4px;">4</p> </div> <div class="jc" style="left:618px; top:364px; width:15;height:20"> <p class="c7" style="margin-top:4px;">3</p> </div> <div class="jc" style="left:645px; top:364px; width:15;height:20"> <p class="c7" style="margin-top:4px;">2</p> </div> <div class="jc" style="left:672px; top:365px; width:15;height:20"> <p class="c7" style="margin-top:4px;">1</p> </div> <div class="jc" style="left:75px; top:18px; width:75px;height:20"> <p class="c9" style="margin-top:4px;">王明傑增加</p> </div> <div class='jc' style="left:74px; top:104px; width:245px;height:20"> <p class="c9" style="margin-top:4px;">希望大街293號 五號樓 3門洞 3樓3號 </p> </div> <div class="jc" style="left:81px; top:209px; width:123;height:20"> <p class="c9" style="margin-top:4px;">王明傑</p> </div> </div> </div> <script></script></div> <table border="0" cellpadding="0" cellspacing="0" width="100%" id="AutoNumber1" > <tr> <td width="33%" height="206" valign="top"><input type="button" value="預覽列印..."
onClick="doPrint('預覽列印...')"><input type="button" value="列印..." onClick="doPrint('列印...')"><input type="button" value="列印" onClick="doPrint('列印')"><input type="button" value="直接列印" onClick="doPrint2()"> </td> </tr></table> <p> </p></body></html>
結果如下: