You are viewing limited content. For full access, please sign in.

Question

Question

How To Get TextAnnotation From BaseAnnotation

SDK
asked on June 9, 2021

I'm iterating through the annotations on a document for the Text Annotations. So far I'm able to determine if each annotation is a Text Annotation, but I'd like to be able to get the text of the annotation. How can I do that? Here is the code I have so far.

using (DocumentInfo di = new DocumentInfo(BoundEntryId,RASession))
{
     List<AnnotationBase> anns = (List<AnnotationBase>)di.GetAnnotations();
     foreach(AnnotationBase ann in anns)
     {
          if (ann.AnnotationType == AnnotationType.TextBox )
          {

          }
     }
}

 

0 0

Answer

SELECTED ANSWER
replied on June 9, 2021

Cast it to a new variable:

TextAnnotation textAnn = (TextAnnotation)ann;

 

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.