FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Printing RTFs with rePrintBox
Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
Printing RTFs with rePrintBox
Posted: Sat Mar 04, 2006 06:59 PM
Antonio;

Hi. I'm a little lost here.

I have rtf text stored on memo fields I wish to print without displaying on the screen. With RePrintBox() it seems like I must have the rtf being displayed. right?

I tried defining the control without displaying by never calling the activate diaglog clause. But still, nothing prints. Here is what I'm using to print:
local a 		:= ::oprn:Inch2Pix( 4.69, 0.75 )
local b		:= ::oprn:Inch2Pix( 9.00, 7.75 )

	::oTranscript:oTrGrss:Selectall()
	REPrintBox( ::oTranscript:oTrGrss:hWnd, If( ::isPreview, ::oPrn:hDCOut, ::oPrn:hDC ), ;
                     ::oTranscript:oTrGrss:IsSelection(), a[1 ], a[2], b[1], b[2] )


How can I print rtf, straight from the memo field to the printer or preview without redefining the richedit control?

Reinaldo.
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Printing RTFs with rePrintBox
Posted: Sat Mar 04, 2006 09:54 PM

Reinaldo,

You may keep the richedit control hidden (oRichEdit:Hide())

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
Printing RTFs with rePrintBox
Posted: Sat Mar 04, 2006 11:18 PM
Antonio;

Yes, that did it. Thank you.

I added a new method to the same class that does the data gathering. Here is that method:

*------------------------------------------------------------------------------------
METHOD DisplayHidden() CLASS PathTrans
local oSelf	:= self, i

	for i:=1 to len( ::aRtfs )
		::aRtfs[ i ]:hide()
	next i

	ACTIVATE DIALOG oSelf:oDlg CENTERED NOWAIT
	::oDlg:Hide()

return nil

*------------------------------------------------------------------------------------


Best,


Reinaldo.
Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
Printing RTFs with rePrintBox
Posted: Sun Mar 05, 2006 12:57 AM

Antonio;

More questions on RePrintBox:

I'm now able to print rtf on a given location on the tprinter page. Good. However, what happens when the text does not fit completetly and I must run to the next page?

How do I know how far did the printed text go so that I may continue on the next page with the rest of the text?

And, is there a way to know exactly at what position on the page the last line was printed?

Thank you,

Reinaldo.

Continue the discussion