How can I print Barcode using FWH ?
-
- Posts: 115
- Joined: Mon Oct 17, 2005 4:42 am
- Location: India
How can I print Barcode using FWH ?
Dear All,
As subject.
TIA
Milan.
As subject.
TIA
Milan.
-
- Posts: 33
- Joined: Sat Jul 07, 2007 5:53 pm
-
- Posts: 115
- Joined: Mon Oct 17, 2005 4:42 am
- Location: India
-
- Posts: 115
- Joined: Mon Oct 17, 2005 4:42 am
- Location: India
Dear All,
I am trying Cayetano's bar lib. This is my sample program. But I am getting only black patches. What am I doing wrong ?
TIA
Milan
----------------------------Cut-----------------------------------
# INCLUDE "fivewin.ch"
PROCEDURE Main
LOCAL cCode := 'ADIPM5996N'
LOCAL oPrinter, nRow, nCol
nRow := 10 // pixel
nCol := 10 // pixel
PRINTER oPrinter FROM USER NAME "Barcode Test" PREVIEW
oPrinter:StartPage()
//Code128(nRow,nCol,cCode,oPrinter,'A',CLR_BLACK,.T., 2,1)
nRow := 50
nCol := 10
Code3_9(nRow,nCol,cCode,oPrinter,.T.,CLR_BLACK,.T.,2,1)
oPrinter:EndPage()
oPrinter:Preview()
RETURN
----------------------------Paste---------------------------------
I am trying Cayetano's bar lib. This is my sample program. But I am getting only black patches. What am I doing wrong ?
TIA
Milan
----------------------------Cut-----------------------------------
# INCLUDE "fivewin.ch"
PROCEDURE Main
LOCAL cCode := 'ADIPM5996N'
LOCAL oPrinter, nRow, nCol
nRow := 10 // pixel
nCol := 10 // pixel
PRINTER oPrinter FROM USER NAME "Barcode Test" PREVIEW
oPrinter:StartPage()
//Code128(nRow,nCol,cCode,oPrinter,'A',CLR_BLACK,.T., 2,1)
nRow := 50
nCol := 10
Code3_9(nRow,nCol,cCode,oPrinter,.T.,CLR_BLACK,.T.,2,1)
oPrinter:EndPage()
oPrinter:Preview()
RETURN
----------------------------Paste---------------------------------
Milan:
Perhaps this code line is missing
#Include "BarCode.ch"
BTW, in \Samples folder there is a good sample using the barcode lib.
Regards
Perhaps this code line is missing
#Include "BarCode.ch"
BTW, in \Samples folder there is a good sample using the barcode lib.
Regards
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
-
- Posts: 115
- Joined: Mon Oct 17, 2005 4:42 am
- Location: India
Milan:
This is the Sample.Prg
#include 'fivewin.ch'
#include 'barcode.ch'
// clipper sample1 /n
// blinker fi sample1 @fivewin lib barlib
function main()
local opr, xStep, yStep, oBr, oFont
printer opr preview
define brush oBr color CLR_YELLOW
//define font oFont name 'ARIAL' size 0,-32 of oPrn
oFont := TFont():New( "ARIAL", 0, -32, .F.,.t.,90,-2,,,,,,,,,oPr )
xStep:=oPr:nVertRes()/100
yStep:=oPr:nHorzRes()/5
page
oPr:say(xStep*49,yStep*2.4,'BarCode Lib',oFOnt,2,CLR_GREEN)
oPr:FillRect({55*xStep,yStep-10,98*xStep,yStep*3.5-10},oBR)
@ 2*xStep, yStep/12 code128 '123456789012' of oPr
@ 10*xStep,yStep/12 code128 '123456789012' of oPr mode 'A'
@ 20*xStep,yStep/12 code128 '123456789012' of oPr mode 'B'
@ 30*xStep,yStep/12 code3_9 '123456789012' of oPr
@ 40*xStep,yStep/12 ean13 '7501157257697'of oPr BANNER
// @ 40*xStep,Ystep sup5 '00441'of oPr banner
@ 40*xStep,Ystep sup5 '1001'of oPr banner
@ 50*xstep,yStep/12 upca '20015318030'of opr SIZE .9 banner VERTICAL
@ 60*xstep,yStep/12 ean8 '1234567'of opr banner
@ 70*xstep,yStep/12 Codabar 'A12-34T' of opr
// vertical
@ xStep,yStep*2.5 upca '12345678901' of oPr;
color CLR_BLUE Vertical banner
@ xStep,yStep*3 code128 '123456789012' of oPr;
color CLR_BLUE Vertical // C mode auto
@ xStep,yStep*4 code128 '123456789012' of oPr ;
mode 'A' color CLR_RED vertical
@ 30*xStep,yStep*3 code128 '123456789012' of oPr ;
mode 'B' color CLR_HBLUE vertical
@ 30*xStep,yStep*4 code3_9 '123456789012' of oPr;
color CLR_GREEN vertical
@ 60*xStep,yStep*3.7 ean13 '7501157257703'of oPr;
color CLR_HRED vertical BANNER FONT 'times'
// BigCode
@ 60*xStep,yStep ean13 '7501157257642' of oPr ;
color CLR_BLUE width 0.1 size 7.5 banner font 'arial'
endpage
page
@ 2*xStep, 10 int25 '123456789012' of oPr
@ 10*xStep,yStep/12 mat25 '123456789012' of oPr
@ 20*xStep,yStep/12 ind25 '123456789012' of oPr
endpage
endprint
oBr:end()
oFOnt:end()
return nil
Regards
This is the Sample.Prg
#include 'fivewin.ch'
#include 'barcode.ch'
// clipper sample1 /n
// blinker fi sample1 @fivewin lib barlib
function main()
local opr, xStep, yStep, oBr, oFont
printer opr preview
define brush oBr color CLR_YELLOW
//define font oFont name 'ARIAL' size 0,-32 of oPrn
oFont := TFont():New( "ARIAL", 0, -32, .F.,.t.,90,-2,,,,,,,,,oPr )
xStep:=oPr:nVertRes()/100
yStep:=oPr:nHorzRes()/5
page
oPr:say(xStep*49,yStep*2.4,'BarCode Lib',oFOnt,2,CLR_GREEN)
oPr:FillRect({55*xStep,yStep-10,98*xStep,yStep*3.5-10},oBR)
@ 2*xStep, yStep/12 code128 '123456789012' of oPr
@ 10*xStep,yStep/12 code128 '123456789012' of oPr mode 'A'
@ 20*xStep,yStep/12 code128 '123456789012' of oPr mode 'B'
@ 30*xStep,yStep/12 code3_9 '123456789012' of oPr
@ 40*xStep,yStep/12 ean13 '7501157257697'of oPr BANNER
// @ 40*xStep,Ystep sup5 '00441'of oPr banner
@ 40*xStep,Ystep sup5 '1001'of oPr banner
@ 50*xstep,yStep/12 upca '20015318030'of opr SIZE .9 banner VERTICAL
@ 60*xstep,yStep/12 ean8 '1234567'of opr banner
@ 70*xstep,yStep/12 Codabar 'A12-34T' of opr
// vertical
@ xStep,yStep*2.5 upca '12345678901' of oPr;
color CLR_BLUE Vertical banner
@ xStep,yStep*3 code128 '123456789012' of oPr;
color CLR_BLUE Vertical // C mode auto
@ xStep,yStep*4 code128 '123456789012' of oPr ;
mode 'A' color CLR_RED vertical
@ 30*xStep,yStep*3 code128 '123456789012' of oPr ;
mode 'B' color CLR_HBLUE vertical
@ 30*xStep,yStep*4 code3_9 '123456789012' of oPr;
color CLR_GREEN vertical
@ 60*xStep,yStep*3.7 ean13 '7501157257703'of oPr;
color CLR_HRED vertical BANNER FONT 'times'
// BigCode
@ 60*xStep,yStep ean13 '7501157257642' of oPr ;
color CLR_BLUE width 0.1 size 7.5 banner font 'arial'
endpage
page
@ 2*xStep, 10 int25 '123456789012' of oPr
@ 10*xStep,yStep/12 mat25 '123456789012' of oPr
@ 20*xStep,yStep/12 ind25 '123456789012' of oPr
endpage
endprint
oBr:end()
oFOnt:end()
return nil
Regards
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
-
- Posts: 115
- Joined: Mon Oct 17, 2005 4:42 am
- Location: India
Milan:
Best regards
I'm glad to hear thatNow I am quite comfortable with Barcode printing with the help of the sample.
I'dont know, I have never used that code barJust curious : Is there any way or shortcut to print banner while using Code128 ?
Best regards
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
-
- Posts: 254
- Joined: Sun Nov 06, 2005 3:55 pm
- Location: Southern California, USA
- Contact:
Print barcode
Why no just get a barcode font and print it like any other piece of text?
Thanks,
Byron Hopp
Matrix Computer Services
Byron Hopp
Matrix Computer Services