For a conversion from DocStar to Laserfiche 10.2 I am also converting document annotations. Using the SDK I need to highlight a section on a page using rectangle coordinates I have from the source document, as opposed to tying it to OCR text. In fact the text is handwritten in many cases. So I am trying to use the HighlightAnnotation, adding the coordinates via an LFRectangle object but it is telling me that the ImageRectangles property of HighlightAnnotation is read only.
<<-- Prior to this I initialize PageInfo as pInfo -->
Dim HA As HighlightAnnotation = New HighlightAnnotation()
Try
HA.ImageRectangles.Add(LFRect) ' Getting an error here that this collection is read only
Catch ex As Exception
LogInformation("Error adding LFRect to ImageRectangle for LFDoc ID " & LFDocID.ToString() & " - Docstar Doc ID: " & AnnotationData.DocID.ToString() & ", Pagenum: " & PageNum.ToString() & ", Content: " & AnnotationData.Text & ": " & ex.Message)
End Try
HA.Color = LFBackgroundColor
Try
pinfo.AddAnnotation(HA)
Catch ex As Exception
LogInformation("Error adding annotation for LFDoc ID " & LFDocID.ToString() & " - Docstar Doc ID: " & AnnotationData.DocID.ToString() & ", Pagenum: " & PageNum.ToString() & ", Content: " & AnnotationData.Text)
End Try
Other annotation types I have tried such as rectangle or redaction cover the text - I need the text on the image under the highlight to be visible. The HighlightAnnotation in 10.2 seems to only accept StartText and EndText from matched OCR text.
Help?