Adding a Signature Field to a PDF Form

It’s possible to add a signature form field to a document, which can then be used as a placeholder for electronic signatures:

const widget = new PSPDFKit.Annotations.WidgetAnnotation({
	id: PSPDFKit.generateInstantId(),
	pageIndex: 0,
	boundingBox: new PSPDFKit.Geometry.Rect({
		left: 200,
		top: 300,
		width: 150,
		height: 75,
	}),
	formFieldName: 'my signature form field',
});
const formField = new PSPDFKit.FormFields.SignatureFormField({
	name: 'my signature form field',
	annotationIds: new PSPDFKit.Immutable.List(widget.id),
});
await instance.create([widget, formField]);