用Delphi6编写的程序控制x1000+时,打印出现跳纸,我用的条码标签是10cm宽的,单个标签的大小为3cm X 1cm ,一行三个标签。但条码有一定的规律,都是四的倍数,就是条4、8、12。。。。条码纸。
程序如下:
procedure TM_BarCode_Setup_f.BitBtn1Click(Sender: TObject);
var
x1,x3,y1,y3,f1,h1,v1,o1,o3,n3,w3,h3,prn,dn,P_quantity:integer;
x4,y4,fs,o4,fw,fi,fu,fd:integer;
M1,P_Human:char;
T3,D1,D2,D3,D4,D5,D6,FT:string;
begin
x1:=strtoint(trim(Edit_X1.text));
x3:=strtoint(trim(Edit_X3.text));
y1:=strtoint(trim(Edit_Y1.text));
y3:=strtoint(trim(Edit_Y3.text));
f1:=strtoint(trim(SpinEdit_font1.text));
h1:=strtoint(trim(SpinEdit_Hor1.text));
v1:=strtoint(trim(SpinEdit_VER1.text));
o1:=strtoint(copy(ComboBox_R1.text,0,1));
o3:=strtoint(copy(ComboBox_R3.text,0,1));
n3:=strtoint(trim(SpinEdit_NARROW.text));
w3:=strtoint(trim(SpinEdit_WIDE.text));
h3:=strtoint(trim(SpinEdit_height.text));
prn:=strtoint(copy(ComboBox_P.text,0,1));
dn:=strtoint(trim(SpinEdit_H.text));
P_quantity:=strtoint(trim(SpinEdit_Q.text));
M1:=ComboBox_M1.text[1];
P_Human:=ComboBox_human.text[1];
T3:=trim(copy(ComboBox_T3.text,0,3));
x4:=strtoint(trim(Edit_X4.text));
y4:=strtoint(trim(Edit_Y4.text));
fs:=strtoint(trim(SpinEdit_fs.text));
o4:=strtoint(copy(ComboBox_R4.text,0,1));
fw:=strtoint(copy(ComboBox_fw.text,0,3));
if CheckBox_fi.Checked then fi:=1 else fi:=0;
if CheckBox_fu.Checked then fu:=1 else fu:=0;
if CheckBox_fd.Checked then fd:=1 else fd:=0;
FT:=trim(Edit_Font.Text);
with DM.Qry_BC_Print do //打开条码打印表
begin
close;
sql.clear;
sql.add('Select * FROM TM_BarCode_Print_Temp');
Open;
end;
DM.Qry_BC_Print.First;
while not DM.Qry_BC_Print.Eof do
begin
D1:=DM.Qry_BC_Print.fieldbyname('Nums1').asstring;
D2:=DM.Qry_BC_Print.fieldbyname('BarCode_Info1').asstring;
D3:=DM.Qry_BC_Print.fieldbyname('Nums2').asstring;
D4:=DM.Qry_BC_Print.fieldbyname('BarCode_Info2').asstring;
D5:=DM.Qry_BC_Print.fieldbyname('Nums3').asstring;
D6:=DM.Qry_BC_Print.fieldbyname('BarCode_Info3').asstring;
CreatePrn(prn, pchar('wl.txt'));
Set_Darkness(dn);
Prn_Text(x1, y1, o1, f1, h1, v1, M1,pchar(D1));
Prn_Barcode(x3, y3, o3, pchar(T3), n3, w3, h3, P_Human, pchar(D1));
Prn_Text_TrueType(x4, y4, fs, pchar(FT), o4, fw, fi, fu, fd, pchar('AA'), pchar(D2));
Prn_Text(x1+255, y1, o1, f1, h1, v1, M1,pchar(D3));
Prn_Barcode(x3+255, y3, o3, pchar(T3), n3, w3, h3, P_Human, pchar(D3));
Prn_Text_TrueType(x4+255, y4, fs, pchar(FT), o4, fw, fi, fu, fd, pchar('BB'), pchar(D4));
Prn_Text(x1+510, y1, o1, f1, h1, v1, M1,pchar(D5));
Prn_Barcode(x3+510, y3, o3, pchar(T3), n3, w3, h3, P_Human, pchar(D5));
Prn_Text_TrueType(x4+510, y4, fs, pchar(FT), o4, fw, fi, fu, fd, pchar('CC'), pchar(D6));
Print_Out(P_quantity);
ClosePrn;
DM.Qry_BC_Print.Next;
end;
end;
恳请个位高手解答(急!!!)
可以电联我,或用QQ也可以
我的QQ号码:43586990 |
|