now it is working for me.
Best regards,
Otto
- Code: Select all Expand view
function rtfDruck()
local oWnd, cHeader := "", oHeader
local cDoc := GetPvProfString( "Setup","RTFTextFile","Dokument.rtf", "inifile.INI" )
cHeader := MemoRead( cDoc )
DEFINE WINDOW oWnd TITLE "New report"
@ 0, 0 RICHEDIT oHeader VAR cHeader SIZE oWnd:nWidth, 70 OF oWnd
ACTIVATE WINDOW oWnd ON INIT oWnd:hide()
return ( oHeader )
//----------------------------------------------------------------------------//
function druckrtf( oVrd, oRtf )
local aMargins := PageGetMargins()
local oPrn := oVrd:oPrn
local nRowPix
// should come from PRINTAREA definded for RTF block
local nTopMargin := 0
local nLeftMargin := 500
local nRightMargin := 500
local nBottomMargin := 1500
*----------------------------------------------------------
nTopMargin := Max( 0, ( oVrd:nNextRow * oPrn:nVertRes() / oPrn:nVertSize() ) - oPrn:nYoffset )
aMargins := { nTopMargin*2, nBottomMargin, nLeftMargin, nRightMargin }
if Empty( oPrn:hDC )
MsgStop( "Printer not ready!" )
return Self
endif
REPrint( oRtf:hWnd, "cName", oPrn:hDCOut, PrnGetPagNums(), PrnGetSelection(), ;
PrnGetCollate(), PrnGetPages(), PrnGetCopies(), aMargins )
return nil
//----------------------------------------------------------------------------//