<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>锐洋Web打印控件测试页</title>
<style type="text/css">
.cssText{ font-size:12px; height:25px; line-height:25px;}
#PrintName{ font-size:13px;color: #ff0000; font-weight:bold;}
.STYLE1 {
font-size: 11px;
color: #00CC00;
}
body,td,th {
font-size: 12px;
}
.STYLE2 {
color: #009900;
font-weight: bold;
}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>
<body onLoad="GetPrinterList();ShowFormList();">
<br>
<object classid ="clsid:DC2A3C42-24DC-4FD6-836A-A2E8594ABC15" codebase ="ReYoPrint.CAB#version=1,601,0,2102" id="ReYoPrint1" width="0" height="0"></object>
<script type="text/javascript" language="JavaScript" for="ReYoPrint1" event="Done">
if(ReYoPrint1.PrintStatus == 1)
{
document.getElementById("PrintStatus").innerText="打印成功!";
}
else
{
document.getElementById("PrintStatus").innerText=ReYoPrint1.getLastError();
}
</script>
<script language="JavaScript" type="text/javascript">
//设置属性
function SetAttribute()
{
ReYoPrint1.ContentURL=document.getElementById("texUrl").value;
ReYoPrint1.Copies =Number(document.getElementById("textCopies").value); 5 ;//'打印份数
ReYoPrint1.Orientation =Number(document.getElementById("pageOrg").value) ;//'打印方向s
if(!checkbox.checked)
{
ReYoPrint1.PaperSize = document.getElementById("textPage").value;
}
else
{
ReYoPrint1.PaperSize = document.getElementById("textFormName").value;
ReYoPrint1.pageHeight = Number(textPageHeight.value);
ReYoPrint1.pageWidth = Number(textPageWidth.value);
}
ReYoPrint1.selectedPages = document.getElementById("SelectUsePage").checked;
ReYoPrint1.pageFrom = Number(textForm.value);
ReYoPrint1.pageTo = Number(textTo.value);
ReYoPrint1.pageHeight = Number(textPageHeight.value);
ReYoPrint1.pageWidth = Number(textPageWidth.value);
ReYoPrint1.marginBottom = Number(document.getElementById("textBottom").value);
ReYoPrint1.marginLeft = Number(document.getElementById("textLeft").value);
ReYoPrint1.marginRight = Number(document.getElementById("textRight").value);
ReYoPrint1.marginTop = Number(document.getElementById("textTop").value);
ReYoPrint1.header=document.getElementById("texHeader").value; //页眉
ReYoPrint1.footer=document.getElementById("texFooter").value; //页脚
ReYoPrint1.defaultPrinterName=document.getElementById("PrinterList").value;
ReYoPrint1.ShowMargin=document.getElementById("SelectShowMagrin").checked;
ReYoPrint1.ShowHeaderFooter=document.getElementById("SelectShowHeadfoo").checked; //是否启用页眉页脚
if(RadioGroup1[0].checked)
{
ReYoPrint1.SetMarginMeasure(1);
}
else
{
ReYoPrint1.SetMarginMeasure(2);
}
document.getElementById("PrintStatus").innerText="进行中...";
}
</script>
<br/>
<p> </p>
<p> </p>
<table width="599" height="303" border="1" align="center" cellpadding="0" cellspacing="0" bgcolor="#EAE7EB">
<tr>
<td height="22" align="center" valign="middle" bgcolor="#FFFFCC"><span class="STYLE2">锐洋Web打印控件测试页</span></td>
</tr>
<tr>
<td width="646" height="261" align="center" valign="middle"><table width="99%" height="243" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>打印 机:
<select name="PrinterList" id="PrinterList" style="width:500px;"
onChange='ReYoPrint1.defaultPrinterName=this.value;ShowFormList();' >
</select> </td>
</tr>
<tr>
<td>纸张类型:
<select name="textPage" id="textPage" style="width:500px;">
</select>
</td>
</tr>
<tr>
<td>
自定义纸:
<input type="checkbox" name="checkbox" value="checkbox" onClick="
if(!this.checked){
textFormName.disabled=true;textPageWidth.disabled=true;textPageHeight.disabled=true;
textPage.disabled=false;
}else{
textFormName.disabled=false;textPageWidth.disabled=false;textPageHeight.disabled=false;
textPage.disabled=true;
};
">
纸张名称:
<input name="textFormName" type="text" disabled="disabled" id="textFormName" value="ReYoPrint自定义纸张" size="18">
宽:
<input name="textPageWidth" type="text" disabled="disabled" id="textPageWidth" value="50" size="10">
高:
<input name="textPageHeight" type="text" disabled="disabled" id="textPageHeight" value="100" size="10"></td>
</tr>
<tr>
<td>纸张边距: 上:
<input name="textTop" type="text" id="textTop" value="20" size="10">
下:
<input name="textBottom" type="text" id="textBottom" value="10" size="10">
左:
<input name="textLeft" type="text" id="textLeft" value="10" size="10">
右:
<input name="textRight" type="text" id="textRight" value="10" size="10"></td>
</tr>
<tr>
<td>打印份数:
<input name="textCopies" type="text" id="textCopies" value="1" size="5">
纸张方向:
<select name="pageOrg" class="a2" id="select">
<option value="1" selected>纵向打印</option>
<option value="2">横向打印</option>
</select>
<input name="SelectUsePage" type="checkbox" id="SelectUsePage" value="checkbox" onClick="
if(!this.checked){
textForm.disabled=true;textTo.disabled=true;
}else{
textForm.disabled=false;textTo.disabled=false;
};
">
选择打印
<input name="textForm" type="text" disabled="disabled" id="textForm" value="1" size="5">
To
<input name="textTo" type="text" disabled="disabled" id="textTo" value="2" size="5"></td>
</tr>
<tr>
<td>目标 URL:
<input name="texUrl" type="text" id="texUrl" style=" width:500px;" value="Http://www.baidu.com"></td>
</tr>
<tr>
<td>尺寸单位: <label>
<input name="RadioGroup1" type="radio" value="1" checked>
毫米(mm)</label>
<label><input type="radio" name="RadioGroup1" value="2">
英寸(ft)
<input name="SelectShowMagrin" type="checkbox" id="SelectShowMagrin" value="true">
显示边距</label> <label>
<input name="SelectShowHeadfoo" type="checkbox" id="SelectShowHeadfoo" value="true" checked>
启用页眉/页脚
</label></td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="56" valign="top"><table width="100%" height="54" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="58" valign="top">页眉设置:</td>
<td valign="top"><textarea name="texHeader" cols="28" rows="3" id="texHeader"><IMG src="http://www.baidu.com/img/baidu_logo.gif"width="100" height="42" border="0"> <span style="color:#339900;font-size:11px"><strong>支持html的图文并茂页眉</strong></span><hr size="1" />
</textarea></td>
</tr>
</table></td>
<td valign="top"><table width="100%" height="54" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="58" valign="top">页脚设置:</td>
<td valign="top"><textarea name="texFooter" cols="28" rows="3" id="texFooter"><hr width="100%" size="1" /><div style="float:right"><span style="color:#339900;font-size:11px">支持html的图文并茂页脚</span></div>
</textarea></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td align="center" valign="middle"><span style=" padding:8px; width: 518px;">
<input name