Add widget annotation and update stroke color

Updated `createAnnotations` to initialize a `PSPDFKit.Annotations.WidgetAnnotation` object, enabling the creation of widget annotations.

Modified `ctx.strokeStyle` in `createAnnotationFrameBlob` to use 'darkblue' instead of 'darkgray', improving the visual appearance of the annotation frame.
This commit is contained in:
2026-08-27 14:46:32 +02:00
parent c2d8b6531c
commit 60ebebc0d8

View File

@@ -13,7 +13,7 @@ async function createAnnotations(document, envelopeId, receiverId) {
const id = generateId(envelopeId, receiverId, element.id, 'signature'); const id = generateId(envelopeId, receiverId, element.id, 'signature');
const boundingBox = new PSPDFKit.Geometry.Rect(annotParams.signature); const boundingBox = new PSPDFKit.Geometry.Rect(annotParams.signature);
const annotation = new PSPDFKit.Annotations.WidgetAnnotation({ const annotation = new PSPDFKit.Annotations.WidgetAnnotation({
id: id, id: id,
pageIndex: page, pageIndex: page,
@@ -273,7 +273,7 @@ async function createAnnotationFrameBlob(receiverName, receiverSignature, timest
ctx.moveTo(30 * scale, 50 * scale) ctx.moveTo(30 * scale, 50 * scale)
ctx.lineTo(signatureLength, 50 * scale) ctx.lineTo(signatureLength, 50 * scale)
ctx.strokeStyle = 'darkgray' ctx.strokeStyle = 'darkblue'
ctx.stroke() ctx.stroke()
ctx.fillStyle = 'black' ctx.fillStyle = 'black'