FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour print labels on TPrinter
Posts: 400
Joined: Fri May 11, 2007 08:20 PM
print labels on TPrinter
Posted: Tue Aug 02, 2011 08:49 PM
Friends
I want to print a text in the middle of an A4 landscape
I like this:
PRINT NAME oPrn "LABEL" PREVIEW
CFont: = "Arial"
oPrn: setPage (9)
oPrn: SetLandscape ()
DEFINE FONT SIZE 0.45 oFont CFont NAME OF BOLD oPrn
cCad1 = "SAMUEL BENDEZU CUADROS"
aCoord = oPrn: Cmtr2Pix (29.7, 21)
nfilpix: = int (aCoord [2] / 2) / / middle row of pixels
nfilmm = nfilpix * 25.4 / oPrn: nLogPixelX () / / convert pixels to mm
nfilcm = nFilmm/10 / / convert the mm to cm.
PAGE
oPrn: CmSay (nfilcm, 1, cCad1, oFont,,, 0)
Do I need to find the width of the text that comes out centered and
if the text has many letters, change the size of the font up
fit into a single line, do you understand me?
ENDPAGE
EndPrint
oFont: = Nil
oPrn: = Nil
Thanks for your comments

Arturo
fwh 17.12, harbour 3.2.0, pelles C, bcc7, Ms-Sql
Posts: 401
Joined: Tue Jan 05, 2010 02:33 PM
Re: print labels on TPrinter
Posted: Fri Aug 05, 2011 12:01 PM

there is a label class on fwh\samples

FWH .. BC582.. xharbour

Continue the discussion