Cod barras padrao ean13 com etiqueta estreita
Olá amigos,
Já trabalho com impressão de código de barras, utilizando os componentes Barcode ou CJV em impressoras a laser ou térmicas.
Mas um cliente, comprou uma etiqueta adesiva com apenas 26mm e não consigo comprimir o código de barras ean13 para essa largura.
Vcs já passaram por essa situação ou tem alguma idéia?
Obrigado
mario
Já trabalho com impressão de código de barras, utilizando os componentes Barcode ou CJV em impressoras a laser ou térmicas.
Mas um cliente, comprou uma etiqueta adesiva com apenas 26mm e não consigo comprimir o código de barras ean13 para essa largura.
Vcs já passaram por essa situação ou tem alguma idéia?
Obrigado
mario
Aldus
Curtidas 0
Respostas
Famatec
19/07/2007
dá uma olhada talvez pode te ajudar
Procedure PrintBarcodeEAN(RVSystem:TRVSystem; Row, Column:Double; Value:String);
Begin
With TRPBarsEAN.Create(RVSystem.BaseReport) do Begin
BarHeight := 0.6;
BarWidth := 0.030;
WideFactor := BarWidth;
Text := Value;
PrintXY(Column,Row);
Free;
end;
End;
Procedure PrintBarcodeUPC(RVSystem:TRVSystem; Row, Column:Double; Value:String);
Begin
With TRPBarsUPC.Create(RVSystem.BaseReport) do Begin
BarHeight := 1.5;
BarWidth := 0.030;
WideFactor := BarWidth;
Text := Value;
PrintXY(Column,Row);
Free;
end;
End;
procedure TFrmbarcode.RvSystem1Print(Sender: TObject);
Var Factor : Double;
CurLabel : Integer;
CurCol : Double;
CurRow : Double;
MarginTop : Double;
MarginLeft : Double;
LabelRow : Integer;
LabelRows : Integer;
LabelCols : Integer;
LabelWidth : Double;
LabelHeight : Double;
linha:integer;
coluna:integer;
etiq:string[12];
etiquet:integer;
nom : string[20];
begin
MarginLeft := 1.8;
MarginTop := 1.3;
LabelWidth := 3.7;
LabelHeight := 1;
LabelRows := 20;
LabelCols := 4;
linha := strtoint(spinedit1.Text);
coluna := strtoint(spinedit2.Text);
CurLabel := coluna - 1 ;
LabelRow := linha - 1;
RVSystem1.BaseReport.SetFont(´Arial´,8);
Factor := (CurLabel Mod LabelCols);
CurCol := (Factor*LabelWidth)+MarginLeft;
CurRow := (LabelRow * LabelHeight) + MarginTop;
nom := dm1.tabprodutoNOME_PRODUTO.Value;
RVSystem1.BaseReport.GotoXY(CurCol,CurRow-0.04);
RVSystem1.BaseReport.Bold := True;
RVSystem1.BaseReport.PrintLeft( nom,CurCol);
RVSystem1.BaseReport.Bold := False;
etiq := dm1.tabprodutoCBARRA.Value;
RVSystem1.BaseReport.GotoXY(CurCol,CurRow);
PrintBarCodeEAN(RVSystem1,CurRow,CurCol,etiq);
Inc(CurLabel);
If Factor=LabelCols-1 Then Inc(LabelRow);
If LabelRow>=LabelRows Then Begin
LabelRow := 0;
End;
end;
procedure TFrmbarcode.SpeedButton1Click(Sender: TObject);
begin
If application.MessageBox (´Atenção? Coloque a etiqueta para imprimir´,´Confirmação´,mb_okcancel) = IdOK then
begin
RVSystem1.SystemPrinter.MarginBottom := 1;
RVSystem1.SystemPrinter.MarginLeft := 1;
RVSystem1.SystemPrinter.MarginTop := 1;
RVSystem1.SystemPrinter.MarginBottom := 1;
RVSystem1.SystemPrinter.Units := unCM;
RVSystem1.SystemPrinter.UnitsFactor := 2;
rpDev.Copies := 1;
RVSystem1.SystemPrinter.Copies := rpDev.Copies;
rpDev.Orientation := poPortrait;
RVSystem1.SystemPrinter.Orientation := rpDev.Orientation;
RVSystem1.SystemPreview.FormState := wsMaximized;
RVSystem1.SystemSetups := RVSystem1.SystemSetups - [ssAllowSetup];
rpDev.SelectPaper(´carta´,false);
// RVSystem1.SystemPreview.RulerType := rtBothCm;
RVSystem1.Execute;
end;
end;
Procedure PrintBarcodeEAN(RVSystem:TRVSystem; Row, Column:Double; Value:String);
Begin
With TRPBarsEAN.Create(RVSystem.BaseReport) do Begin
BarHeight := 0.6;
BarWidth := 0.030;
WideFactor := BarWidth;
Text := Value;
PrintXY(Column,Row);
Free;
end;
End;
Procedure PrintBarcodeUPC(RVSystem:TRVSystem; Row, Column:Double; Value:String);
Begin
With TRPBarsUPC.Create(RVSystem.BaseReport) do Begin
BarHeight := 1.5;
BarWidth := 0.030;
WideFactor := BarWidth;
Text := Value;
PrintXY(Column,Row);
Free;
end;
End;
procedure TFrmbarcode.RvSystem1Print(Sender: TObject);
Var Factor : Double;
CurLabel : Integer;
CurCol : Double;
CurRow : Double;
MarginTop : Double;
MarginLeft : Double;
LabelRow : Integer;
LabelRows : Integer;
LabelCols : Integer;
LabelWidth : Double;
LabelHeight : Double;
linha:integer;
coluna:integer;
etiq:string[12];
etiquet:integer;
nom : string[20];
begin
MarginLeft := 1.8;
MarginTop := 1.3;
LabelWidth := 3.7;
LabelHeight := 1;
LabelRows := 20;
LabelCols := 4;
linha := strtoint(spinedit1.Text);
coluna := strtoint(spinedit2.Text);
CurLabel := coluna - 1 ;
LabelRow := linha - 1;
RVSystem1.BaseReport.SetFont(´Arial´,8);
Factor := (CurLabel Mod LabelCols);
CurCol := (Factor*LabelWidth)+MarginLeft;
CurRow := (LabelRow * LabelHeight) + MarginTop;
nom := dm1.tabprodutoNOME_PRODUTO.Value;
RVSystem1.BaseReport.GotoXY(CurCol,CurRow-0.04);
RVSystem1.BaseReport.Bold := True;
RVSystem1.BaseReport.PrintLeft( nom,CurCol);
RVSystem1.BaseReport.Bold := False;
etiq := dm1.tabprodutoCBARRA.Value;
RVSystem1.BaseReport.GotoXY(CurCol,CurRow);
PrintBarCodeEAN(RVSystem1,CurRow,CurCol,etiq);
Inc(CurLabel);
If Factor=LabelCols-1 Then Inc(LabelRow);
If LabelRow>=LabelRows Then Begin
LabelRow := 0;
End;
end;
procedure TFrmbarcode.SpeedButton1Click(Sender: TObject);
begin
If application.MessageBox (´Atenção? Coloque a etiqueta para imprimir´,´Confirmação´,mb_okcancel) = IdOK then
begin
RVSystem1.SystemPrinter.MarginBottom := 1;
RVSystem1.SystemPrinter.MarginLeft := 1;
RVSystem1.SystemPrinter.MarginTop := 1;
RVSystem1.SystemPrinter.MarginBottom := 1;
RVSystem1.SystemPrinter.Units := unCM;
RVSystem1.SystemPrinter.UnitsFactor := 2;
rpDev.Copies := 1;
RVSystem1.SystemPrinter.Copies := rpDev.Copies;
rpDev.Orientation := poPortrait;
RVSystem1.SystemPrinter.Orientation := rpDev.Orientation;
RVSystem1.SystemPreview.FormState := wsMaximized;
RVSystem1.SystemSetups := RVSystem1.SystemSetups - [ssAllowSetup];
rpDev.SelectPaper(´carta´,false);
// RVSystem1.SystemPreview.RulerType := rtBothCm;
RVSystem1.Execute;
end;
end;
GOSTEI 0