Skip to main content

RenderBitmap

Renders an image of the signature. Optionally encodes the SigObj in the generated image using steganographic techniques.

Parameters
renderWidth: int value indicating the width specified as DPI (dots per inch) or Pixels. Negative value = DPI (the signature is not scaled). Positive value = Pixels (the signature is scaled to fit the area).
renderHeight: int value indicating the height specified as DPI (dots per inch) or Pixels. Negative value = DPI (the signature is not scaled). Positive value = Pixels (the signature is scaled to fit the area).
mimeType: String specifying the image format as one of:
  • image/png
  • image/jpeg
inkWidth: float value with the signature ink width in pixels. This is only valid when using a standard JavaScript canvas. When using WILL Ink canvas, this value is ignored.
inkColor: String with the signature ink colour.
inkBackground: String with the image background colour.
paddingX, paddingY: float values with the padding around the signature image, added to both the left and the right for paddingX, and both the top and bottom for paddingY. Dimensions are specified as mm or pixels.
  • Negative value = mm.
  • Positive value = pixels.
Flags: int value with a combination of the following values (a single value from each mandatory group must be included):
success: calback function that it is called when the image is generated successfully, with a parameter image containing the url base 64 string with the image
fails: callback function called when there is some error, indicating the error as an string parameter
Will InkCanvas callback: function that returns and Inking canvas for rendering the image using Wacom WILL Ink SDK or null if the image is going to be rendered using a common JavaScript canvas.

Image extension (optional):

0x400000 (RenderEncodeData) – Encode signature data within image (only valid for png type)

Other (optional):

0x1000000 (RenderClipped) – Crop signature image, omitting any parts which were outside of the original capture window.

0x2000000 (RenderRelative) – Renders the signature image relative to the origin of the original capture window. (Dimensions must be equal DPI (negative) values; padding values must be 0)

Return values
The function returns a promise that resolves to an image URL (String) when it succeeds or raises an exception if false.