Description of Control
It generates a screenshot of a web page quickly and easily.
The user control web ScreenCapture allows to generate a screenshot of a web page, returning the result in image format.
This facilitates, for example, generating PDF reports of a dashboard with graphics and having filters applied to the data that are very complex to print later in a GeneXus report.
Using the control
Open Extensibility Catalog, and go to the WEB section through the left side menu.
Select the ScreenCapturecontrol. Follow the steps of the
Create a Web Panel
, drag from the toolbox
the control to the WP form.
In execution, the capture can be generated by calling the GetScreen control method, then the example that the control adds is shown:
When the control finishes generating the capture, it calls the event OnImageCapture, passing it in the Data property the generated file in png format in a base64 string, which can be loaded in a blob variable, to then use it, as shown below:
&string = scaScreenCapture1.Data