Table of Contents

Class PdfEllipseAnnotation

Namespace
Syncfusion.Pdf.Interactive
Assembly
Syncfusion.Pdf.Portable.dll

Represents a PDF ellipse annotation

public class PdfEllipseAnnotation : PdfCircleAnnotation, INotifyPropertyChanged
Inheritance
PdfEllipseAnnotation
Implements
Inherited Members

Constructors

PdfEllipseAnnotation(RectangleF, string)

Initialise the new instance of the ellipse annotation with bounds and text.

public PdfEllipseAnnotation(RectangleF rectangle, string text)

Parameters

rectangle RectangleF

Used to represent the bounds of the annotation

text string

Used to represents the text of the annotation

Properties

Comments

Gets the annotation Comments

public PdfPopupAnnotationCollection Comments { get; }

Property Value

PdfPopupAnnotationCollection

Examples

//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Create a new page.
PdfPage page = document.Pages.Add();
//To specify the line end points
RectangleF rectangle = new RectangleF(10, 40, 30, 30);
//Create a new line annotation and set properties.
PdfEllipseAnnotation ellipseAnnotation = new PdfEllipseAnnotation(rectangle, "Ellipse");
ellipseAnnotation.Text = "Circle";
//Add Comments state
PdfPopupAnnotation popupComments = new PdfPopupAnnotation();
popupComments.Author = "TestAuthor";
popupComments.Text = "Test Text";
ellipseAnnotation.Comments.Add(popupComments);
//Get annotation comments
PdfPopupAnnotationCollection commentsCollection = ellipseAnnotation.Comments;
//Saves the document to disk.
document.Save("Output.pdf");
document.Close(true);
Dim document As PdfDocument = New PdfDocument
Dim page As PdfPage = document.Pages.Add
Dim rectangle As RectangleF = New RectangleF(10, 40, 30, 30)
Dim ellipseAnnotation As PdfEllipseAnnotation = New PdfEllipseAnnotation(rectangle, "Ellipse")
ellipseAnnotation.Text = "Circle"
Dim popupComments As PdfPopupAnnotation = New PdfPopupAnnotation
popupComments.Author = "TestAuthor"
popupComments.Text = "Test Text"
ellipseAnnotation.Comments.Add(popupComments)
Dim commentsCollection As PdfPopupAnnotationCollection = ellipseAnnotation.Comments
'Saves the document to disk.
document.Save("Output.pdf")
document.Close(true)

ReviewHistory

Gets the annotation reviews

public PdfPopupAnnotationCollection ReviewHistory { get; }

Property Value

PdfPopupAnnotationCollection

Examples

//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Create a new page.
PdfPage page = document.Pages.Add();
//To specify the line end points
RectangleF rectangle = new RectangleF(10, 40, 30, 30);
//Create a new line annotation and set properties.
PdfEllipseAnnotation ellipseAnnotation = new PdfEllipseAnnotation(rectangle, "Ellipse");
ellipseAnnotation.Text = "Circle";
//Add Review state
PdfPopupAnnotation popup = new PdfPopupAnnotation();
popup.State = PdfAnnotationState.Accepted;
popup.StateModel = PdfAnnotationStateModel.Review;
popup.Text = "Hello PDF Comments";
ellipseAnnotation.ReviewHistory.Add(popup);
//Get Review history
PdfPopupAnnotationCollection reviewCollection = ellipseAnnotation.ReviewHistory;
//Saves the document to disk.
document.Save("Output.pdf");
document.Close(true);
Dim document As PdfDocument = New PdfDocument
Dim page As PdfPage = document.Pages.Add
Dim rectangle As RectangleF = New RectangleF(10, 40, 30, 30)
Dim ellipseAnnotation As PdfEllipseAnnotation = New PdfEllipseAnnotation(rectangle, "Ellipse")
ellipseAnnotation.Text = "Circle"
Dim popup As PdfPopupAnnotation = New PdfPopupAnnotation
popup.State = PdfAnnotationState.Accepted
popup.StateModel = PdfAnnotationStateModel.Review
popup.Text = "Hello PDF Comments"
ellipseAnnotation.ReviewHistory.Add(popup)
Dim reviewCollection As PdfPopupAnnotationCollection = ellipseAnnotation.ReviewHistory
'Saves the document to disk.
document.Save("Output.pdf")
document.Close(true)
Dim document As PdfDocument = New PdfDocument
Dim page As PdfPage = document.Pages.Add
Dim rectangle As RectangleF = New RectangleF(10, 40, 30, 30)
Dim ellipseAnnotation As PdfEllipseAnnotation = New PdfEllipseAnnotation(rectangle, "Ellipse")
ellipseAnnotation.Text = "Circle"
Dim popup As PdfPopupAnnotation = New PdfPopupAnnotation
popup.State = PdfAnnotationState.Accepted
popup.StateModel = PdfAnnotationStateModel.Review
popup.Text = "Hello PDF Comments"
ellipseAnnotation.ReviewHistory.Add(popup)
Dim reviewCollection As PdfPopupAnnotationCollection = ellipseAnnotation.ReviewHistory
'Saves the document to disk.
document.Save("Output.pdf")
document.Close(true)

Methods

Initialize()

Initializes annotation object.

protected override void Initialize()

Save()

Saves an annotation.

protected override void Save()