Code: Select all
If oper.ID = Me.docPreview.Inst.Str2ID("op.document.importCommentsAndFields", False) Then
Dim docModified As Boolean = Me.docPreview.Doc.Modified
Dim nID As Integer = Me.docPreview.Inst.Str2ID("op.annots.setProps", False)
Dim Op As PDFXEdit.IOperation = Me.docPreview.Inst.CreateOp(nID)
Dim inputProps As PDFXEdit.ICabNode = Op.Params.Root("Input")
Dim annotsList As PDFXEdit.IPXV_AnnotsList = Me.docPreview.Inst.CreateAnnotsList()
If importingAnnots = True Then
For i As UInteger = 0 To Me.docPreview.Doc.CoreDoc.Pages.Count - 1
Dim page As PDFXEdit.IPXC_Page = Me.docPreview.Doc.CoreDoc.Pages(i)
Dim nCnt As UInteger = page.GetAnnotsCount()
If nCnt <> 0 Then
For j As UInteger = 0 To nCnt - 1
Dim addToTable As Boolean = False
Dim annot As PDFXEdit.IPXC_Annotation = page.GetAnnot(j)
If annot.IsMarkup Then
inputProps.Add().v = annot
Dim options As PDFXEdit.ICabNode = Op.Params.Root("Options")
options("Subject").v = "Highlight"
options("Flags").v = 640
options("Mask").v = 4194304
Op.Do()
End If
Next
End If
Next
End If
End If
Simon