createSignatureAnnotation in 'Annotation' entfernt.

This commit is contained in:
Developer 02 2024-06-18 19:55:57 +02:00
parent 6464a591a8
commit 2f4ffac9c4

View File

@ -51,27 +51,9 @@
const top = Annotation.inchToPoint(element.top) - height / 2
const left = Annotation.inchToPoint(element.left) - width / 2
const page = element.page - 1
const annotation = Annotation.createSignatureAnnotation(
id,
width,
height,
top,
left,
page
)
const formField = new PSPDFKit.FormFields.SignatureFormField({
name: id,
annotationIds: PSPDFKit.Immutable.List([annotation.id]),
})
return [annotation, formField]
}
static createSignatureAnnotation(id, width, height, top, left, pageIndex) {
const annotation = new PSPDFKit.Annotations.WidgetAnnotation({
id: id,
pageIndex: pageIndex,
pageIndex: page,
formFieldName: id,
backgroundColor: PSPDFKit.Color.YELLOW,
blendMode: 'multiply',
@ -83,7 +65,12 @@
}),
})
return annotation
const formField = new PSPDFKit.FormFields.SignatureFormField({
name: id,
annotationIds: PSPDFKit.Immutable.List([annotation.id]),
})
return [annotation, formField]
}
static createImageAnnotation(boundingBox, pageIndex, imageAttachmentId) {