Add Circle to PDF with C# REST API

This tutorial guides how to add circle to PDF with C# REST API. You will learn to automatically draw a circle on a PDF with C# .NET-based API using a .NET-based Cloud SDK. It will also provide details to customize the circle according to your needs.

Prerequisite

Steps to Draw Circle in PDF with C# REST Interface

  1. Configure the PdfApi class object by setting the API and application details
  2. Create the CircleAnnotation object and set the rectangular area for the circle and color
  3. Set the modified and creation dates as these are mandatory
  4. Upload the target PDF file to the Cloud storage for adding a circle
  5. Call the PostPageCircleAnnotations() method to draw the circle in the given rectangle
  6. Download the updated PDF file with the circle in it

These steps describe how to insert circle in PDF with C# REST API. The CircleAnnotation is the main object that defines the format of the circle such as its dimensions, location, and color, etc. Upload the target PDF file to the Cloud storage, set the creation and modification dates, and call the PostPageCircleAnnotations() method to draw the circle.

Code to Add Circle in PDF with C# RESTful Service

This code has demonstrated the process of how to add a circle to a PDF with C# Low Code API. You may repeat this process by drawing multiple circles on the same page or drawing circles on multiple pages using different page numbers in the PostPageCircleAnnotations() method. Only one call to the PostPageCircleAnnotations() method can draw multiple circles as it takes a list of annotations where more than one entry can be added.

This article has taught us to draw a circle on a PDF. If you want to highlight some portion of a PDF page, refer to the article on Highlight PDF Document with C# REST API.

 English