TakeScreenShot

function TakeScreenShot(ContentName: string): void

The function TakeScreenShot is used to create a screenshot. The transfer parameter is used for the specific naming of the screenshot file, but is not mandatory for the functionality.

TakeScreenShot 1:

Limitations and permissions

This function only takes screen shots of visible areas of the shared tab, window or full screen. It cannot trigger any scroll action or capture any out of view area in the result screen shots.

To allow this function to take screen shots, the user must approve screen sharing permission that the browser will raise before taking any screen shot. The user must select a proper tab, window or full monitor and allow the browser to access the selected view to take its screen shot.

TakeScreenShot 2:

Only suitable for secure context

Most modern browsers only allow screen sharing in secure context (https://), user might not be allowed to take screen shot if used in non-secure (http://) URL.

Parameter

Name

Type

Description

ContentName [ Optional ]

string

The path of the current TcHmiContent to be attached to the screenshot file name.

Return value

Type

Description

void

no return value

NuGet package: Beckhoff.TwinCAT.HMI.Plastic.Functions

Available from version 12.6.0

Usage: TC3 Plastic Application HMI projects