|
我用bs_300k的打印机,用delphi直接写并口,怎么走6-7张后,票就会往上跳一点,
奇怪
PrntTicketno:=Copy(ATicketno,(length(ATicketNo)-1),2);
AMoney:=Num2CNum(StrToInt(AMoney));
PrintChannel:=getSetupIni('Current','no');
stationId:=getSetupIni('Current','id');
Assignfile(f,'LPT1');
rewrite(f);
{初始化打印机}
// Write(f,chr(27)+'@'); //chr(27)=ESC
{设置汉字显示方式}
//write(f,chr(28)+chr(ord('&'))); //chr(28)=FS
{设定打印相对水平位置}
// Write(f,chr(27)+chr(ord('\'))+chr($FF)+chr($00));
Write(f,chr(28)+chr(51)+chr(63));
Write(f,chr(27)+chr(43)+chr(63));
//设置高速打印
// write(f,chr(28)+chr(ord('x'))+chr($01));
Writeln(f);
Writeln(f,' '+stationid+' '+PrintChannel+' '+Auserid+' '+PrntTicketno);
Writeln(f);
write(f,chr(27)+chr(ord('\'))+chr($CF)+chr($00));
//放大金额字体
Write(f,chr(28)+chr(ord('W'))+chr($01));
Write(f, ' '+AMoney);
//解除放大字体
Write(f,Chr(28)+chr(ord('W'))+chr($00));
Writeln(f);
Writeln(f);
write(f,chr(27)+chr(ord('\'))+chr($CF)+chr($00));
Writeln(f,' '+Apntdate+' '+ApntTime);
Write(f,chr(27)+chr(ord('J'))+chr($FF));
Write(f,chr(11));
flush(f);
Closefile(f); |
|