Class PdfPolyLineAnnotation
Represents a PolyLine annotation.
Implements
Inherited Members
Namespace: Syncfusion.Pdf.Interactive
Assembly: Syncfusion.Pdf.UWP.dll
Syntax
public class PdfPolyLineAnnotation : PdfAnnotation, IPdfWrapper
Constructors
PdfPolyLineAnnotation(Int32[], String)
Initialise the new instance of the poly line annotation with bounds and text.
Declaration
public PdfPolyLineAnnotation(int[] points, string text)
Parameters
Type | Name | Description |
---|---|---|
System.Int32[] | points | Used to represent the poloygon points |
System.String | text | Used 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
Declaration
public PdfLineEndingStyle BeginLineStyle { get; set; }
Property Value
Type | Description |
---|---|
PdfLineEndingStyle |
Border
Get or sets the border style of the square annotaion.
Declaration
public LineBorder Border { get; set; }
Property Value
Type | Description |
---|---|
LineBorder |
Comments
Gets the annotation comments
Declaration
public PdfPopupAnnotationCollection Comments { get; }
Property Value
Type | Description |
---|---|
PdfPopupAnnotationCollection |
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
Declaration
public PdfLineEndingStyle EndLineStyle { get; set; }
Property Value
Type | Description |
---|---|
PdfLineEndingStyle |
LineExtension
Gets or sets Leading Line Extension, Defacult value is 0
Declaration
public int LineExtension { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
ReviewHistory
Gets the annotation reviews
Declaration
public PdfPopupAnnotationCollection ReviewHistory { get; }
Property Value
Type | Description |
---|---|
PdfPopupAnnotationCollection |
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.
Declaration
protected override void Initialize()
Overrides
Save()
Saves an annotation.
Declaration
protected override void Save()