GroupDocsGists
10/24/2017 - 5:13 PM

AddPointAnnotationslides.cs

// For complete examples and data files, please go to https://github.com/groupdocsannotation/GroupDocs_Annotation_NET
// Get input file stream
Stream inputFile = new FileStream(CommonUtilities.MapSourceFilePath(filePath), FileMode.Open, FileAccess.ReadWrite);
// Initialize list of AnnotationInfo
List<AnnotationInfo> annotations = new List<AnnotationInfo>();

// Point annotation
AnnotationInfo pointAnnotation = new AnnotationInfo
{
    AnnotationPosition = new Point(852.0, 81.0),
    Box = new Rectangle(212f, 81f, 142f, 0.0f),
    PageNumber = 0,
    Type = AnnotationType.Point,
    CreatorName = "Anonym A."
};
// Add annotation to list
annotations.Add(pointAnnotation);
                
// Export annotation and save output file
CommonUtilities.SaveOutputDocument(inputFile, annotations, DocumentType.Slides);