Tutorial: Window.capturePage

Window.capturePage

Gets a base64 encoded image of the window.

Example

const wnd = await fin.Window.getCurrent();

// PNG image of a full visible window
console.log(await wnd.capturePage());

// Low-quality JPEG image of a defined visible area of the window
const options = {
    area: {
        height: 100,
        width: 100,
        x: 10,
        y: 10,
    },
    format: 'jpg',
    quality: 20
}
console.log(await wnd.capturePage(options));