Question:
Can I use the Platform .NET API to edit the text annotation?
Solution:
Following codesample is a simple way to edit the text annotation of a document:
public void WriteInTextAnnotation(Document document, string text)
{
byte[] byteArray = Encoding.ASCII.GetBytes(text);
MemoryStream stream = newMemoryStream(byteArray);
document.PostToTextAnnotationRelationForStream(stream);
}
The method PostToTextAnnotationRelationForStream needs a stream as parameter. A simple way to generate a stream out of a string (text) is shown above. (There are other ways to generate a stream as well.)