Printing RTFs with rePrintBox

Printing RTFs with rePrintBox

Postby reinaldocrespo » Sat Mar 04, 2006 6: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:
Code: Select all  Expand view  RUN
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.
User avatar
reinaldocrespo
 
Posts: 979
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Postby Antonio Linares » Sat Mar 04, 2006 9:54 pm

Reinaldo,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby reinaldocrespo » 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:

Code: Select all  Expand view  RUN
*------------------------------------------------------------------------------------
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.
User avatar
reinaldocrespo
 
Posts: 979
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Postby reinaldocrespo » 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.
User avatar
reinaldocrespo
 
Posts: 979
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 56 guests