在成批打印左右并排的两张标签时,右边的标签出现内容打印不全的现象,如下列代码中的'住院号'部分,但不是每张右标签都会,大概打6-8张出现一次。用的dll是winpplb.dll,编程语言是DELPHI 5.0,代码如下,请问是为什么?
{批量打印主流程}
while i>0 do
begin
with prnform do
begin
prnready;
APrnData:=GetCurrData(ACds);
printleft; //打印左标签
i:=i-1;
if i>0 then
begin
ACds.next;
BPrnData:=GetCurrData(ACds);
PrintRight; //打印右标签
ACds.next;
i:=i-1;
end;
printout;
closeprinter;
end;
end;
finally
prnform.Free;
end;
{打印左标签}
procedure TPrnForm.printleft;
begin
Prn_Barcode(x-30, y+130, 0, '1', 2, 2, _high, 'b', pchar(APrnData.Barcode));
Prn_Text_TrueType(x-38, y+10, _Font, pchar('test1'), 1, 400, 0, 0, 0, pchar('AA'), pchar('日期:'+APrnData.RegDate));
Prn_Text_TrueType(x-38, Y+50, _Font, pchar('test2'), 1, 400, 0, 0, 0, pchar('Ab'), pchar('门诊号:'+APrnData.bedno));
Prn_Text_TrueType(x-38, Y+80, _Font, pchar('test2'), 1, 400, 0, 0, 0, pchar('Ac'), pchar('住院号:'+APrnData.checkinno));
end;
{打印右标签}
procedure TPrnForm.printright;
begin
Prn_Barcode(x+xAdd-35, y+130, 0, '1', 2, 2, _high, 'b', pchar(BPrnData.barcode));
Prn_Text_TrueType(x+xAdd-35, y+10, _Font, pchar('test1'), 1, 400, 0, 0, 0, pchar('Ad'), pchar('日期:'+BPrnData.regdate));
Prn_Text_TrueType(x+xAdd-35, Y+50, _Font, pchar('test1'), 1, 400, 0, 0, 0, pchar('Ae'), pchar('门诊号:'+BPrnData.bedno));
Prn_Text_TrueType(x+xAdd-40, Y+80, _Font, pchar('test2'), 1, 400, 0, 0, 0, pchar('Af'), pchar('住院号:'+BPrnData.checkinno));
end;
|
|