[Gambas-user] How to use WBrowser.Print(True)

Tobias Boege taboege at ...626...
Mon Sep 1 22:01:29 CEST 2014


On Mon, 01 Sep 2014, abbat81 wrote:
> Hi,
> 
> I want to print HTML by "WBrowser.Print(True)"
> 
> but I get:
> 
> "Unknown symbol 'Print' in class in WebView"
> 

Yes, because there is no such thing as a Print method in the WebView class.

> WebVew is created:
> 
> Private WBrowser As WebView
> WBrowser = New WebView(FPreview)
> 
> How to fix it to print HTML ?
> 

Assuming you want to print the _rendition_ of the HTML, I think you can do
it by

  Dim hPrinter As New Printer

  If hPrinter.Configure() Then Return
  WBrowser.Frame.Print(hPrinter)

Regards,
Tobi

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk




More information about the User mailing list