Contact Support
SignatureSelect and SignatureUnselect event
6 Dec 20241 minute to read
The Syncfusion® PDF Viewer provides event-handling capabilities for various actions, including selecting and unselecting handwritten signatures. The signatureSelect
and signatureUnselect
events enable developers to programmatically manage the selection state of signatures within the PDF Viewer component.
signatureSelect
The signatureSelect
event triggers when a handwritten signature annotation is selected. This event allows developers to capture the signature selection and handle it programmatically, such as updating the UI or storing the selection data for further processing.
signatureUnselect
The signatureUnselect
event triggers when a handwritten signature annotation is unselected. This event enables developers to manage the unselection programmatically, which can be useful for tasks like cleanup operations or updating the application’s state to reflect that a signature is no longer selected.
The code snippet demonstrates how to subscribe to the signatureSelect
and signatureUnselect
events in the Syncfusion® PDF Viewer component.
@{
ViewBag.Title = "Home Page";
}
<div style="width:100%;height:600px">
@Html.EJS().PdfViewer("pdfviewer").DocumentPath("https://cdn.syncfusion.com/content/pdf/hive-succinctly.pdf").SignatureUnselect("signatureUnselect").SignatureSelect("signatureSelect").Render()
</div>
<script>
function signatureSelect(args) {
console.log('Signature selected:', args);
};
function signatureUnselect(args) {
console.log('Signature selected:', args);
};
</script>
@{
ViewBag.Title = "Home Page";
}
<div style="width:100%;height:600px">
@Html.EJS().PdfViewer("pdfviewer").ServiceUrl(VirtualPathUtility.ToAbsolute("~/api/PdfViewer/")).DocumentPath("https://cdn.syncfusion.com/content/pdf/hive-succinctly.pdf").SignatureUnselect("signatureUnselect").SignatureSelect("signatureSelect").Render()
</div>
<script>
function signatureSelect(args) {
console.log('Signature selected:', args);
};
function signatureUnselect(args) {
console.log('Signature selected:', args);
};
</script>
The signatureSelect
and signatureUnselect
events in Syncfusion® PDF Viewer offer robust options for managing the state of handwritten signatures within your application. By handling these events, developers can create a more interactive and dynamic user experience, responding programmatically to signature selection and unselection.