FreeText Annotation not being added in New Adobe
- June 11, 2025
- 1 reply
- 194 views
I have vb.net code that was adding a Text Box to my Adobe forms. It worked prior to the new version of adobe. I was using the following code:
Public Sub addAnnotation(commentText As String, PageNum As String, rect() As Object, editable As Boolean)
Dim annot As Object
Dim props As Object
annot = jso.addAnnot()
props = annot.getProps
props.type = "FreeText"
props.page = PageNum
props.contents = commentText
props.strokeColor = jso.Color.black
props.Rect = rect
props.name = commentText
props.readonly = editable
annot.setProps(props)
End Sub
After going to the newer version (I cannot go back to the older version of Adobe due to company policy) it does nothing when I run this. I made a small change and have it assign the type of FreeText first which then gives me a rectangle on the Form, but the text doesn't display in it.
Public Sub addAnnotation(commentText As String, PageNum As String, rect() As Object, editable As Boolean)
Dim annot As Object
Dim props As Object
annot = jso.addAnnot()
props = annot.getProps
props.type = "FreeText"
annot.setProps(props)
props = annot.getProps
props.page = PageNum
props.contents = commentText
props.strokeColor = jso.Color.black
props.Rect = rect
props.name = commentText
props.readonly = editable
annot.setProps(props)
End Sub
What do I need ot chnage so I can add the type of text box threw the SDK to display the text on the form.
