L
liuaono1
Unregistered / Unconfirmed
GUEST, unregistred user!
打印机为 LQ - 1600K , 页面设置为自定义,打印完后如何使其"不"自动换页?
(注:LQ - 1600KIII 打印机,连续纸模式下能做到"不"自动换页),字符串打印代码
如下,请您修改:
procedure Tkd1.PrintStrings(Strings1: TStrings);
var
MyFile: TextFile;
i: word;
begin
SetPaperSize(2230,30);
Printer.PrinterIndex := -1;
AssignPrn(MyFile);
try
Rewrite(MyFile);
printer.canvas.font.size:=14;
writeln(MyFile, ' 月未/已平衡出库单号码');
writeln(MyFile);
printer.canvas.font:=SrcList.font;
try
if Strings1.Count=0 then
writeln(MyFile, ' 未: '+'无')
else
for i := 0 to Strings1.Count-1 do
case (i mod 10) of
0 : if i=0 then
write(MyFile, ' 未: '+Strings1.Strings)
else
write(MyFile, ' '+Strings1.Strings);
9 : writeln(MyFile, ' '+Strings1.Strings);
else
write(MyFile, ' '+Strings1.Strings);
end;
finally
CloseFile(MyFile);
end;
except
on EInOutErrordo
MessageDlg('打印出错!', mtError, [mbOk], 0);
end;
end;
(注:LQ - 1600KIII 打印机,连续纸模式下能做到"不"自动换页),字符串打印代码
如下,请您修改:
procedure Tkd1.PrintStrings(Strings1: TStrings);
var
MyFile: TextFile;
i: word;
begin
SetPaperSize(2230,30);
Printer.PrinterIndex := -1;
AssignPrn(MyFile);
try
Rewrite(MyFile);
printer.canvas.font.size:=14;
writeln(MyFile, ' 月未/已平衡出库单号码');
writeln(MyFile);
printer.canvas.font:=SrcList.font;
try
if Strings1.Count=0 then
writeln(MyFile, ' 未: '+'无')
else
for i := 0 to Strings1.Count-1 do
case (i mod 10) of
0 : if i=0 then
write(MyFile, ' 未: '+Strings1.Strings)
else
write(MyFile, ' '+Strings1.Strings);
9 : writeln(MyFile, ' '+Strings1.Strings);
else
write(MyFile, ' '+Strings1.Strings);
end;
finally
CloseFile(MyFile);
end;
except
on EInOutErrordo
MessageDlg('打印出错!', mtError, [mbOk], 0);
end;
end;