Hi there - I have a an app that runs on both windows and Mac… however, while I can save the HTMLViewer contents as an image on the Mac using MBS plugins,
I’m wondering how to do this on windows.
Any ideas?
Cheers,
Sean
I did search the forum but it only had Mac examples.
Using MBSPlugins generally works on mac, however be aware that some content within a HTMLViewer may not render when you do this (examples include Flash plugins, WebGL animations, some videos, etc.)
For that reason, I changed over to actually taking a screenshot (also using MBSPlugins) of the window that’s displaying the HTMLViewer. The screenshot works for all content on both mac and windows. Limitations of a screenshot: the window has to be onscreen, you are limited to the maximum screen height, etc.
If your app is in charge of the HTML content, then you don’t have to worry about strange content not rendering, so I would use RenderWebsiteImageMBS on macOS.
I’ve never used .print on windows, but there have been lots of threads here about printing resolution issues - what Xojo version are you using?
// Get image from IE
picWeb = HTMLViewer1.IEImageMBS
canvas1.backdrop = picWeb[/code]
my code:
Dim picWeb As Picture
picWeb = SRBrowser.IEImageMBS
dim f as FolderItem
f= specialfolder.ApplicationData.child("Guitar SightReader Toolbox").child("ABC").child("Tests").child("Printout.png")
picweb.Save(f, picweb.SaveAsPNG)
this gave me an unsupportedOperationexception on this
picWeb = SRBrowser.IEImageMBS
SRBrowser is an Htmlviewer
what gives?