2、进入维护工具(开始-程序-浪潮软件-管理工具-维护工具)
3、文件-控件注册
4、路径选择为ttf16ocx这个文件在你电脑的 路径,一般在 windows\system32 文件夹里
5、点击“注册”按钮在打印机上设置纸张的大小设置横向或纵向打印,
请自己理解一下你自己用的脚本,你用的是拷贝了当前的屏幕
如果不需要打印全屏,自定义打印区域,
拷贝输出本来就是个很简单的问题,不屑多说了!
#pragma code ("prtscrndll")
#include "prtscrnh"
#pragma code()
long Left, Top, Width, Height;
Left=0;
Top=0;
Width=(需要输出的尺寸);
Height=(需要输出的尺寸);
PrtScreenPart ((ULONG) Left, (ULONG) Top, (ULONG) Width, (ULONG) Height);你可以先在打印机界面自定义纸张,把您的纸张的尺寸长和宽输入,保存该纸型,然后在凭证打印的界面,点击设置,选择刚刚自定义好的纸张进行打印。
回答者:zyshao1260
-
试用期
一级
8-12
18:39
再补充下:定义完纸型后,在凭证选项中选择纸张,如果打印纸是用友的打印纸(或者带格子的),选择套打勾选去掉。选择连续纸型。下面是我用的一段打印代码,应该符合你的要求,里面有页面设置和打印预览等功能,代码如下:
<html>
<head>
<script defer>
function SetPrintSettings() {
// -- advanced features
factoryprintingSetMarginMeasure(2) // measure margins in inches
factorySetPageRange(false, 1, 3) // need pages from 1 to 3
factoryprintingprinter = "HP DeskJet 870C"
factoryprintingcopies = 2
factoryprintingcollate = true
factoryprintingpaperSize = "A4"
factoryprintingpaperSource = "Manual feed"
// -- basic features
factoryprintingheader = "This is MeadCo"
factoryprintingfooter = "Advanced Printing by ScriptX"
factoryprintingportrait = false
factoryprintingleftMargin = 10
factoryprintingtopMargin = 10
factoryprintingrightMargin = 10
factoryprintingbottomMargin = 10
}
</script>
<script language="javascript">
function printsetup(){
// 打印页面设置
wbexecwb(8,1);
}
function printpreview(){
// 打印页面预览
wbexecwb(7,1);
}
function printit()
{
if (confirm('确定打印吗?')) {
wbexecwb(6,6)
}
}
</script>
<STYLE>
body { padding:0; margin:0; font-family:"宋体"; font-size:12px; text-align:center}
P {page-break-after: always; margin:0 auto}
@media print {print_unvisiable{display: none;}}
@media print {print_visiable{display:"";}}
@media screen {screen_unvisiable{display:none;}}
@media screen {screen_visiable{display:"";}}
div { overflow:hidden}
pbody {
clear:both;
width:700px;
margin:0 auto;
border:1px #000 solid
}
pbodys {
clear:both;
width:694px;
display:inline;
float:left;
border:1px #535353 solid;
margin:2px
}
titles {
clear:both;
width:700px;
height:40px;
display:inline;
float:left;
text-align:center;
line-height:40px;
font-size:28px;
font-family:"黑体"
}
spanbh {
clear:both;
width:700px;
height:20px;
display:inline;
float:left;
text-align:right;
line-height:20px;
font-size:12px;
font-family:Arial, Helvetica, sans-serif;
margin-top:-20px
}
</STYLE>
</head>
<body>
<OBJECT classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2" height=0 id=wb name=wb width=0></OBJECT>
<div class="pbody" style="border:0">
<div class="titles">客户信息表</div>
<span class="bh">编号:KEHU10001 </span>
</div>
<input type=button name=button_print value="打印" class="print_unvisiable" onClick="javascript:printit()">
<input type="button" name=button_setup value="打印页面设置" class="print_unvisiable" onClick="javascript:printsetup();">
<input type="button" name=button_show value="打印预览" class="print_unvisiable" onClick="javascript:printpreview();">
<input type="button" name="button_fh" value="关闭" class="print_unvisiable" onClick="javascript:windowclose();" />
</body>
</html>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)