- Available for ZK:
- This component supports IE10+ and modern browsers.
Signature components support signature pad on the desktop and mobile browsers. User can customize pen size, pen color, background color etc., it also provides undo, save and clear methods.
<signature width="600px" height="300px" penColor="white" backgroundColor="#AED6F1" penSize="6"/>
There are 3 buttons when you hover on this component: (from left to right)
- undo: to remove the last step that was drawn on the signature pad.
- save: to save the signature image to the server, a user can get the image by listening onSave event.
- clear: to clear signature pad.
The toolbar contains 3 buttons: undo button, clear button, and save button. They are visible by default. If you can hide them:
The toolbar buttons only contain icons by default. If you want to show message after icons on the buttons, we provide three attributes:
<signature undoLabel="Undo" clearLabel="Clear" saveLabel="Save"/>
There are some attributes to adjust the signature style:
the width of a line on the signature, the default is 1.
Can be any color format accepted by context.fillStyle(canvas), defaults to black.
Can be any color format accepted by context.fillStyle(canvas), defaults to white.
Can be any image format accepted by context.drawImage(canvas), defaults to null.
The background color and image will be saved by default. If you don't want to save the background color and image, please use the following setting.
Scanned Paper Form
You can load a scanned paper form as a background and save it with a signature.
Saves Signature Image
After clicking "Save" button, the component will upload the signature to a server. You can listen
onSave to get the uploaded signature and show it with Image:
<signature onSave="image.setContent(event.getMedia())"/> <image id="image"/>
File Size Limit
If you see
SizeLimitExceededException, you can adjust max uploading file size by
When user invoke the save method, the event would be triggered.
When user invoke the clear method, the event would be triggered.