I'm looking for a simple way to print with richedi5 a memofield on two pages
I Added a print-button to the sample-collector for printing samples.
Just a textsplitting is needed ( max 2 pages nothing special )
I couln't find any sample.
One page printing of imported topics
- Code: Select all Expand view
STATIC FUNCTION PRINTTOPIC( lPreview, oTCode, cTopic, cTAuthor, cTLink )
LOCAL oPrn
LOCAL aRTF := { 0, 100 } // { nFrom, nTop }
DEFINE FONT oBold NAME "Arial" SIZE 0,-56 BOLD
DEFINE FONT oMono NAME "Arial" SIZE 0,-12
DEFAULT lPreview := .f.
IF lPreview
PRINT oPrn NAME "FWH SAMPLE FILE" PREVIEW
ELSE
PRINT oPrn NAME "FWH SAMPLE FILE"
ENDIF
IF EMPTY( oPrn:hDC )
MsgStop( "Printer not ready!" )
RETURN NIL
ENDIF
PAGE
CURSORWAIT()
oPrn:InchSay( 0.40, 0.95, cTopic, oBold )
oPrn:InchSay( 0.50, 0.95, cTAuthor, oBold )
oPrn:InchSay( 0.60, 0.95, cTLink, oBold )
// nFrom := REPrintBox5( ::hWnd, hDC, ::IsSelection(), ;
// nTop, nLeft, nRight, nBottom, nFrom )
aRTF := REPrintBox5( oTCode:hWnd, If( lPreview, oPrn:hDCOut, oPrn:hDC ), ;
oTCode:IsSelection(), ;
aRTF[ 2 ] + 500, 500, 3500, aRTF[ 2 ] + 5500, aRTF[ 1 ] )
CursorArrow()
ENDPAGE
ENDPRINT
oBold:End()
oMono:End()
RETURN NIL
regards
Uwe