oWnd:SayText( cText, aRect, ... )
oPrn:SayText( cText, aRect, ... )
@ r,c PRINT TO oPrn TEXT cText SIZE w,h INCHES/CM/MMsamples\rtfprn.prg
#include "fivewin.ch"
function Main()
local oPrn, cText, cRtf, oFont, oBold
cText := MEMOREAD( "rtfprn.prg" )
cRtf := MEMOREAD( "testrtf.rtf" )
PRINT oPrn PREVIEW
DEFINE FONT oFont NAME "LUCIDA CONSOLE" SIZE 0,-10 OF oPrn
DEFINE FONT oBold NAME "ARIAL" SIZE 0,-20 OF oPrn
PAGE
oPrn:Say( 0.5, 0.8, "Rich Text", oBold,,,,, "INCHES" )
oPrn:Box( 0.8, 0.8, 5.2, 7.2,,,, "INCHES" )
@ 1, 1 PRINT TO oPrn TEXT cRtf SIZE 6,4 INCHES
oPrn:Say( 5.5, 0.8, "Normal Text", oBold,,,,, "INCHES" )
oPrn:Box( 5.8, 0.8, 10.2, 7.2,,,, "INCHES" )
@ 6, 1 PRINT TO oPrn TEXT cText SIZE 6,4 INCHES FONT oFont
ENDPAGE
ENDPRINT
RELEASE FONT oFont, oBold
return nilSame syntax is used for both normal text and rich text.

G. N. Rao.
Hyderabad, India

