Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 7.1   7.2   7.3   7.4   7.5   8.0   8.1   8.2   8.3   8.4    Statistic  

WebView.RenderImage

Renders the webview to a picture.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
WebView 2.1 Yes Yes No No Yes

MBS( "WebView.RenderImage"; WebViewerRef { ; ImageType; Filename } )

Parameters

Parameter Description Example value
WebViewerRef Either the Web Viewer Object Name or the Web Viewer ID as returned by "WebView.FindByName" function.
ImageType Optional
The type of image to return. Either JPEG, PNG, GIF or BMP. Default is JPEG.
"JPEG"
Filename Optional
The filename to use for the picture. Default is "image" with the extension matching the image type.
"test.jpg"

Result

Returns a container with a JPEG picture of the webpage. You can store it in a media field.

Description

Renders the webview to a picture.
Added Windows support in version 3.0. Due the way we capture image on Windows (we ask webviewer to print to image), some things do not show up in the image. In that case, please use WebView.Screenshot function.
On Mac you can use WebView.RenderPDF to get a PDF of the website.
For Mac OS X the image size is the size of the full website. On Windows we only capture the area of the webviewer, so you may see scrollbars.

For OS X please use WebView.SetPreferences to set whether to include background images.

Added support for macOS 10.13 in FileMaker 16 to render webpage in v7.4.
Not supported for WebKit 2.x (FileMaker 16 Mac) for older macOS versions or plugin versions.
Works in FileMaker 15 and older in all MacOS versions.
Works in all FileMaker Mac versions, when using a Web Viewer with WebKit 1.x created using WebView.Create.

Fixed for iOS for 8.2 release.

Examples

Render Image:

Set Field [ Own WebView::Container ; MBS( "WebView.RenderImage"; $$web; "PNG"; "webview.png") ]

See also

Example Databases

Created 18th August 2014, last changed 27th April 2018


WebView.Reload   -   WebView.RenderPDF

Feedback: Report problem or ask question.




Links
MBS Xojo Plugins