20-11-23
This commit is contained in:
@@ -101,23 +101,9 @@
|
||||
return annotation
|
||||
}
|
||||
|
||||
async createFrameAnnotation(annotation, receiver) {
|
||||
const left = annotation.boundingBox.left - 25
|
||||
const top = annotation.boundingBox.top - 25
|
||||
const width = 150
|
||||
const height = 75
|
||||
|
||||
const imageUrl = await this.Annotation.createAnnotationFrameBlob(
|
||||
receiver.name,
|
||||
width,
|
||||
height
|
||||
)
|
||||
const request = await fetch(imageUrl)
|
||||
const blob = await request.blob()
|
||||
|
||||
const imageAttachmentId = await this.Instance.createAttachment(blob)
|
||||
createImageAnnotation(boundingBox, pageIndex, imageAttachmentId) {
|
||||
const frameAnnotation = new PSPDFKit.Annotations.ImageAnnotation({
|
||||
pageIndex: annotation.pageIndex,
|
||||
pageIndex: pageIndex,
|
||||
isSignature: false,
|
||||
readOnly: true,
|
||||
locked: true,
|
||||
@@ -125,13 +111,9 @@
|
||||
contentType: 'image/png',
|
||||
imageAttachmentId,
|
||||
description: 'FRAME',
|
||||
boundingBox: new PSPDFKit.Geometry.Rect({
|
||||
left: left,
|
||||
top: top,
|
||||
width: width,
|
||||
height: height,
|
||||
}),
|
||||
})
|
||||
boundingBox: boundingBox,
|
||||
});
|
||||
return frameAnnotation
|
||||
}
|
||||
|
||||
async createAnnotationFrameBlob(receiverName, width, height) {
|
||||
|
||||
Reference in New Issue
Block a user