Html2Canvas

Wisej.Web.Ext.Html2Canvas.Html2Canvas

Namespace: Wisej.Web.Ext.Html2Canvas

Assembly: Wisej.Web.Ext.Html2Canvas (2.0.0.0)

Implementation of the html2canvas (https://html2canvas.hertzen.com/) library. It's a singleton instance that can take a screenshot of a specific control or the entire browser and send the image back to the server.

public class Html2Canvas : Component

Usage is quite easy:

  Html2Canvas.Screenshot(this, (image) => {
  image.Save(@"\images\screen.png");
});

  // or using asynchronous code:

  var image = await Html2Canvas.Screenshot(this.panel1);
  image.Save(@"\images\screen.png");

Methods

Takes a screenshot of the browser.

Parameter

Type

Description

callback

Callback method that receives the Image object.

Throws:

Takes a screenshot of the browser.

Parameter

Type

Description

options

The Html2CanvasOptions to pass to the html2canvas call.

callback

Callback method that receives the Image object.

Throws:

Takes a screenshot of the specified Control.

Parameter

Type

Description

target

The Control to render to an Image

callback

Callback method that receives the Image object.

Throws:

Takes a screenshot of the specified Control.

Parameter

Type

Description

target

The Control to render to an Image

options

The Html2CanvasOptions to pass to the html2canvas call.

callback

Callback method that receives the Image object.

Throws:

Asynchronously returns an Image that represents a screenshot of the browser.

Parameter

Type

Description

options

The Html2CanvasOptions to pass to the html2canvas call.

Returns: Task. An awaitable Task that contains the screenshot.

Asynchronously returns an Image that represents a screenshot of the specified Control as it appears on the browser.

Parameter

Type

Description

target

The Control to render to an Image

options

The Html2CanvasOptions to pass to the html2canvas call.

Returns: Task. An awaitable Task that contains the screenshot.

Inherited

Methods

Name

Description

From

Last updated