Adding Ellipse Annotation in PDF Documents

Share on FacebookTweet about this on TwitterShare on LinkedIn

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 PDF documents 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:
https://gist.github.com/830d1f1f5e6eb2489829b152f7a6d889 Fixed valueAnnotationType.Ellipse is always used as Type for adding an Ellipse Annotation.

Code Example for PDF Documents

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:
https://gist.github.com/840a8aecb2e466e8b11e2110bd7f9563″>Gist.
Then the Ellipse annotation is added to the list of annotations:
View the code on Gist. Finally, we will export the annotation and save the output file:
View the code on <a href="https://gist.github.com/795ac8604817b8be9d6cbf380d1cd1a1 This way we have added an Ellipse annotation to our PDF document using GroupDocs.Annotation API.

The complete C# code will look like this:
https://gist.github.com/fcb0736c7f0e3cef3d8d03ed4a0844de”>Gist.
The code in Java will look like this:
View the code on <a href="https://gist.github.com/705c29f24cf3c7a5efffe88768bde0a0 After adding Ellipse Annotation the output document will looks like following screenshot:

The post Adding Ellipse Annotation in PDF Documents appeared first on Document Manipulation APIs Blog – groupdocs.com.