Class PdfCircleAnnotation
- Namespace
- Syncfusion.Pdf.Interactive
- Assembly
- Syncfusion.Pdf.Portable.dll
Represents a PDF circle annotation
public class PdfCircleAnnotation : PdfAnnotation, INotifyPropertyChanged
- Inheritance
-
PdfCircleAnnotation
- Implements
- Derived
- Inherited Members
Constructors
PdfCircleAnnotation(RectangleF)
Initialise the new instance of the circle annotation with bounds.
public PdfCircleAnnotation(RectangleF rectangle)
Parameters
rectangle
RectangleFUsed to represent the bounds of the annotation
PdfCircleAnnotation(RectangleF, string)
Initialise the new instance of the circle annotation with bounds and text.
public PdfCircleAnnotation(RectangleF rectangle, string text)
Parameters
rectangle
RectangleFUsed to represent the bounds of the annotation
text
stringUsed to represents the text of the annotation
Properties
Border
Get or set the border style of the circle annotaion.
public LineBorder Border { get; set; }
Property Value
Comments
Gets the annotation comments
public PdfPopupAnnotationCollection Comments { get; }
Property Value
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.
PdfCircleAnnotation circleAnnotation = new PdfCircleAnnotation(rectangle);
circleAnnotation.Text = "Circle";
//Add comment state
PdfPopupAnnotation popupComments = new PdfPopupAnnotation();
popupComments.Author = "TestAuthor";
popupComments.Text = "Test Text";
circleAnnotation.Comments.Add(popupComments);
//Get annotation comments
PdfPopupAnnotationCollection commentsCollection = circleAnnotation.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 circleAnnotation As PdfCircleAnnotation = New PdfCircleAnnotation(rectangle)
circleAnnotation.Text = "Circle"
Dim popupComments As PdfPopupAnnotation = New PdfPopupAnnotation
popupComments.Author = "TestAuthor"
popupComments.Text = "Test Text"
circleAnnotation.Comments.Add(popupComments)
Dim commentsCollection As PdfPopupAnnotationCollection = circleAnnotation.Comments
'Saves the document to disk.
document.Save("Output.pdf")
document.Close(true)
ReviewHistory
Gets the annotation reviews
public PdfPopupAnnotationCollection ReviewHistory { get; }
Property Value
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.
PdfCircleAnnotation circleAnnotation = new PdfCircleAnnotation(rectangle);
circleAnnotation.Text = "Circle";
//Add Review state
PdfPopupAnnotation popup = new PdfPopupAnnotation();
popup.State = PdfAnnotationState.Accepted;
popup.StateModel = PdfAnnotationStateModel.Review;
popup.Text = "Hello PDF Comments";
popup.Author = "Test1";
circleAnnotation.ReviewHistory.Add(popup);
//Get Review history
PdfPopupAnnotationCollection reviewCollection = circleAnnotation.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 circleAnnotation As PdfCircleAnnotation = New PdfCircleAnnotation(rectangle)
circleAnnotation.Text = "Circle"
Dim popup As PdfPopupAnnotation = New PdfPopupAnnotation
popup.State = PdfAnnotationState.Accepted
popup.StateModel = PdfAnnotationStateModel.Review
popup.Text = "Hello PDF Comments"
popup.Author = "Test1"
circleAnnotation.ReviewHistory.Add(popup)
Dim reviewCollection As PdfPopupAnnotationCollection = circleAnnotation.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()