Tutorial: View.capturePage

View.capturePage

Gets a base64 encoded image of the View.

Example

const view = fin.View.getCurrentSync();

// PNG image of a full visible View
console.log(await view.capturePage());

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