« JPEG String to Pictur… | Home | Tip of the day: Zoom … »

Picture from HTMLViewer

Recently a client asked on how to get an image from a htmlviewer.

Well, on Windows this is easy as we have only one function there: HTMLViewer.IEImageMBS as picture. This gives you an image. We recommend you resize htmlviewer to IEScrollHeightMBS/IEScrollWidthMBS to have the whole page visible.

On Mac we have more options:and if you query the WebviewMBS from HTMLViewer or you have no HTMLViewer, but only a WebviewMBS, you can use this methods:
  • WebViewMBS.RenderDocumentToEPS as Memoryblock
  • WebViewMBS.RenderDocumentToPDF as Memoryblock
  • WebViewMBS.RenderWebsiteImage as NSImageMBS
  • WebViewMBS.RenderImage(subviews as boolean=false) as variant
  • WebViewMBS.PrintToPDFFile(PDFFile as folderitem, LeftMargin as double = 50.0, TopMargin as double = 50.0, RightMargin as double = 50.0, BottomMargin as double = 50.0) as boolean
  • method dataWithEPSInsideRect(left as double, top as double, width as double, height as double) as Memoryblock
  • method dataWithPDFInsideRect(left as double, top as double, width as double, height as double) as Memoryblock
So you can get with various ways images or PDF. And from PDF you can of course make image, too. The biggest plugin in space...
21 02 13 - 10:15