New topic: 

HTMLViewer printing

<http://forums.realsoftware.com/viewtopic.php?t=38305>

         Page 1 of 1
   [ 1 post ]                 Previous topic | Next topic          Author  
Message        danf          Post subject: HTMLViewer printingPosted: Thu Mar 
24, 2011 4:07 pm                         
Joined: Thu Mar 24, 2011 3:13 pm
Posts: 3                Would like to have a bit more control over printing the 
HTML rendered by HTMLViewer.

the HTMLViewer.print  method does not let me switch page orientation.

thought I would do this, but end up printing a blank page.  I'm pretty new to 
working with graphics/pictures etc so maybe I'm just doing it wrong...or 
perhaps drawInto does not work with HTMLViewer ?

  Dim pict As Picture
  Dim ps As PrinterSetup
  Dim g As Graphics
  Dim cc,c As Integer
  
  pict = new Picture(self.HTMLViewer1.width, self.HTMLViewer1.height, 32)
  self.HTMLViewer1.DrawInto( pict.Graphics, 0, 0 )
  
  ps = New PrinterSetup
  ps.Landscape =True
  
  If ps.pageSetupDialog then
  g = OpenPrinterDialog(ps)
  If g <> Nil Then
  c=g.Copies
  For cc=1 To c
    if c>1 then g.next page
    g.DrawPicture(pict, 0,0,ps.Width,ps.Height,0,0,pict.Width,pict.Height)
  Next cc
  g=nil
  End If
  End If   
                             Top            Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 1 post ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to