HTML scaling for WebHTMLViewer

Is there a flag for it? I didn’t see anything in the docs, but I have a web page I need to display during my app execution, I am able to load and display the page, but it doesn’t scale it to fit in the box I assigned so it has a horizontal scroll bar (a vertical one is no big deal) - is there a way to get it to scale the content to fit in a horizontal space?

works on OSX

HTMLViewer1.ExecuteJavaScript """80%"""

@Axel: Thank you for posting this solution. I had been wrestling with this for a while as most of the zooming options don’t seem to work with a WebKit HTMLViewer on Windows. The above solution worked just fine!

[quote=78673:@Axel Schneider]works on OSX

HTMLViewer1.ExecuteJavaScript """80%"""[/quote]

Works on Windows as well with both Native and Webkit renderer :slight_smile:

Possibly drifting slightly OT, but a solution I came across here for showing scaled imaged that you only have the URL of without scroll bars was this:

HTMLViewer.LoadPage("<img src=""" + pic + """style=""height:100%;""><Style type=""text/css""> body {overflow: hidden; margin-top: 0px; margin-left: 0px;} </Style>",Nil)

…where “pic” is a string containing the URL.

You can then just resize the HTML Viewer in the IDE and it just works really nicely.