How to Add Circle to PDF using C#

This article describes how to add circle to PDF using C#. It provides the step-wise logic to write this application along with the running sample code to add circle in Adobe Acrobat using C#. Different formatting options are also discussed along with the environment configurations.

Steps to Add a Circle to a PDF using C#

  1. Set the environment to add Aspose.PDF for .NET to the project to add a circle to the PDF
  2. Create a PDF file using the Document object and add a page to it
  3. Create a graph object and a circle with a specified color
  4. Add the circle to the shapes collection of the graph object
  5. Add the resultant graph object to the paragraph collection of the selected page
  6. Save the resultant PDF file with a circle in it

These steps explain the process to add circle to PDF document using C# such that all the necessary classes and methods are highlighted and links are provided for more details. It shows that for drawing any shape on a PDF page, you need to add a Graph object by providing its dimensions and then create the required shape like a circle for adding it to the graph object. Once the graph object is filled with the drawing objects, the graph object is added to the PDF page as a paragraph item.

Code to Draw a Circle in Adobe Acrobat using C#

This code demonstrates how to insert a circle in PDF using C# where a Graph object is used to hold the circle and other types of shapes. This graph object has a specified dimension, you can set its border, title, ZIndex and set the flag to create a new page for this item, to name a very few. For the circle object, you can set its position in the graph object, radius, and text.

This article has provided us with details for adding a circle to the PDF. If you want to learn the process to add a watermark to a PDF, refer to the article on how to add watermark to PDF in C#.

 English