|
@@ -231,6 +231,10 @@ class ComPDFKitViewer {
|
|
|
if (Number(annotation.pageIndex) + 1 > this.pagesCount) return
|
|
|
this.pushAnnotations(annotation)
|
|
|
if (!this.webviewerServer || annotation.type === 'stamp') {
|
|
|
+ if ('destPage' in annotation) {
|
|
|
+ annotation.doc = this.doc
|
|
|
+ annotation.pageHeight = this.pagesPtr[annotation.pageIndex].height
|
|
|
+ }
|
|
|
const pagePtr = this.pagesPtr[annotation.pageIndex].pagePtr
|
|
|
const annotPtr = await this.messageHandler.sendWithPromise('CreateAnnotation', {
|
|
|
doc: this.doc,
|
|
@@ -790,7 +794,7 @@ class ComPDFKitViewer {
|
|
|
annotation.isMultiLine = rawAnnotation.textStyle.multiLine === 'true' ? 1 : 0
|
|
|
annotation.isHidden = !rawAnnotation.flags && rawAnnotation.flags === 'invisible' ? 1 : 0
|
|
|
annotation.items = this.#getItems(rawAnnotation)
|
|
|
- annotation.selected = round(rawAnnotation.select, 0)
|
|
|
+ annotation.selected = round(rawAnnotation.select, 0) - 1
|
|
|
break
|
|
|
case 'pushbutton': {
|
|
|
const pushbuttonAction = rawAnnotation.OnActivation && rawAnnotation.OnActivation.Action
|
|
@@ -1591,6 +1595,8 @@ class ComPDFKitViewer {
|
|
|
case 'listbox':
|
|
|
annotation.type = 'list-box'
|
|
|
annotation.color && (annotation.textColor = annotation.color)
|
|
|
+ 'selected' in annotation && (annotation.selecte = annotation.selected)
|
|
|
+ delete annotation.selected
|
|
|
delete annotation.color
|
|
|
break
|
|
|
case 'combobox':
|
|
@@ -1601,12 +1607,14 @@ class ComPDFKitViewer {
|
|
|
case 'pushbutton':
|
|
|
annotation.type = 'push-button'
|
|
|
annotation.color && (annotation.textColor = annotation.color)
|
|
|
+ 'destPage' in annotation && (annotation.destPage = annotation.destPage - 1)
|
|
|
delete annotation.color
|
|
|
break
|
|
|
}
|
|
|
|
|
|
if (annotation.operate === 'mod-form') {
|
|
|
annotation.color && (annotation.textColor = annotation.color)
|
|
|
+ 'destPage' in annotation && (annotation.destPage = annotation.destPage - 1)
|
|
|
delete annotation.color
|
|
|
}
|
|
|
|