samicheema August 9, 20190 Comments

Adding Ellipse Annotation in a PDF Document

Adding Ellipse Annotation in a PDF Document

August 9, 2019

GroupDocs.Annotation API

GroupDocs.Annotation comes with an extensive set of tools that you can use to easily add common shapes to your documents as an annotation. The list of tools is not limited to area, point, text, polyline, etc. In this section, we will primarily discuss how the Ellipse annotation could be added in a PDF document by using GroupDocs.Annotation API.

Adding Ellipse Annotation

While discussing the family of annotation types, we cannot ignore ellipse annotation. It could be regarded as a multi-purposed annotation type. For example, it could be used to display extra information on your graphs or you can use it to circle important information. AnnotationInfo could be used to set color, page, opacity, creator name and many more. At minimum following two properties of AnnotationInfo have to be set for drawing an ellipse, which determine the size and type of the annotation:

Fixed valueAnnotationType.Ellipse is always used as Type for adding an Ellipse Annotation.

Code Example for a PDF Document

For adding ellipse to a PDF document, first we will need to get the document in form of Stream by using following line of code:


Then the Ellipse annotation is added to the list of annotations:
Finally, we will export the annotation and save the output file:
This way we have added an Ellipse annotation to our PDF document using GroupDocs.Annotation API.

The complete C# code will look like this:


The code in Java will look like this:
After adding Ellipse annotation the output document will looks like following screenshot:

Share on FacebookTweet about this on TwitterShare on LinkedIn
Posted inGroupDocs.Annotation Product FamilyTags: , , ,
 

Related Articles