Class PdfEllipseAnnotation
Represents a PDF ellipse annotation
Implements
System.ComponentModel.INotifyPropertyChanged
Inherited Members
Namespace: Syncfusion.Pdf.Interactive
Assembly: Syncfusion.Pdf.NET.dll
Syntax
public class PdfEllipseAnnotation : PdfCircleAnnotation, IPdfWrapper, INotifyPropertyChanged
Constructors
PdfEllipseAnnotation(RectangleF, String)
Initialise the new instance of the ellipse annotation with bounds and text.
Declaration
public PdfEllipseAnnotation(RectangleF rectangle, string text)
Parameters
Type | Name | Description |
---|---|---|
RectangleF | rectangle | Used to represent the bounds of the annotation |
System.String | text | Used to represents the text of the annotation |
Properties
Comments
Gets the annotation Comments
Declaration
public PdfPopupAnnotationCollection Comments { get; }
Property Value
Type |
---|
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
Declaration
public PdfPopupAnnotationCollection ReviewHistory { get; }
Property Value
Type |
---|
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.
Declaration
protected override void Initialize()
Overrides
Save()
Saves an annotation.
Declaration
protected override void Save()
Overrides
Implements
System.ComponentModel.INotifyPropertyChanged