Class PdfPolyLineAnnotation
- Namespace
- Syncfusion.Pdf.Interactive
- Assembly
- Syncfusion.Pdf.Portable.dll
Represents a PolyLine annotation.
public class PdfPolyLineAnnotation : PdfAnnotation, INotifyPropertyChanged
- Inheritance
-
PdfPolyLineAnnotation
- Implements
- Inherited Members
Constructors
PdfPolyLineAnnotation(int[], string)
Initialise the new instance of the poly line annotation with bounds and text.
public PdfPolyLineAnnotation(int[] points, string text)
Parameters
points
int[]Used to represent the poloygon points
text
stringUsed to represents the text of the annotation
Properties
BeginLineStyle
Gets or sets the style used for the beginning of the line, Default value is None
public PdfLineEndingStyle BeginLineStyle { get; set; }
Property Value
Border
Get or sets the border style of the square 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();
//Create a new rectangle
int[] points = new int[] { 80, 420, 150, 420 };
//Create a new line annotation.
PdfPolyLineAnnotation PolylineAnnotation = new PdfPolyLineAnnotation(points, "Ployline");
//Set the text and font
PolylineAnnotation.Text = "Hello";
//set comments
PdfPopupAnnotation popupComments = new PdfPopupAnnotation();
popupComments.Author = "TestAuthor";
popupComments.Text = "Test Text";
PolylineAnnotation.Comments.Add(popupComments);
//Get annotation comments
PdfPopupAnnotationCollection commentsCollection = PolylineAnnotation.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 points() As Integer = New Integer() { 80, 420, 150, 420}
Dim PolylineAnnotation As PdfPolyLineAnnotation = New PdfPolyLineAnnotation(points, "Ployline")
'Set the text and font
PolylineAnnotation.Text = "Hello"
Dim popupComments As PdfPopupAnnotation = New PdfPopupAnnotation
popupComments.Author = "TestAuthor"
popupComments.Text = "Test Text"
PolylineAnnotation.Comments.Add(popupComments)
Dim commentsCollection As PdfPopupAnnotationCollection = PolylineAnnotation.Comments
'Saves the document to disk.
document.Save("Output.pdf")
document.Close(true)
EndLineStyle
Gets or sets the style used for the ending of the line, Default value is None
public PdfLineEndingStyle EndLineStyle { get; set; }
Property Value
LineExtension
Gets or sets Leading Line Extension, Defacult value is 0
public int LineExtension { get; set; }
Property Value
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();
//Create a new rectangle
int[] points = new int[] { 80, 420, 150, 420 };
//Create a new line annotation.
PdfPolyLineAnnotation PolylineAnnotation = new PdfPolyLineAnnotation(points, "Ployline");
//Set the text and font
PolylineAnnotation.Text = "Hello";
//set review state
PdfPopupAnnotation popup = new PdfPopupAnnotation();
popup.State = PdfAnnotationState.Accepted;
popup.StateModel = PdfAnnotationStateModel.Review;
popup.Text = "Hello PDF Comments";
PolylineAnnotation.ReviewHistory.Add(popup);
//Get Review history
PdfPopupAnnotationCollection reviewCollection = PolylineAnnotation.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 points() As Integer = New Integer() { 80, 420, 150, 420}
Dim PolyConAnnotation As PdfPolygonAnnotation = New PdfPolygonAnnotation(points, "Ploycon")
'Set the text and font
PolyConAnnotation.Text = "Hello"
Dim popup As PdfPopupAnnotation = New PdfPopupAnnotation
popup.State = PdfAnnotationState.Accepted
popup.StateModel = PdfAnnotationStateModel.Review
popup.Text = "Hello PDF Comments"
PolyConAnnotation.ReviewHistory.Add(popup)
Dim reviewCollection As PdfPopupAnnotationCollection = PolyConAnnotation.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()