Class PdfAnnotationBorder
- Namespace
- Syncfusion.Pdf.Interactive
- Assembly
- Syncfusion.Pdf.Portable.dll
Represents the appearance of an annotation's border.
public class PdfAnnotationBorder
- Inheritance
-
PdfAnnotationBorder
- Inherited Members
Examples
//Create a new PDF Document.
PdfDocument document = new PdfDocument();
//Create a new page.
PdfPage page = document.Pages.Add();
//Create a new rectangle
RectangleF popupAnnotationRectangle = new RectangleF(10, 40, 30, 30);
//Create a new popup annotation.
PdfPopupAnnotation popupAnnotation = new PdfPopupAnnotation(popupAnnotationRectangle, "Test popup annotation");
//Set the annotation border to popup annotation.
popupAnnotation.Border = new PdfAnnotationBorder(4, 0, 0);
//Add this annotation to a new page.
page.Annotations.Add(popupAnnotation);
//Save the document to disk.
document.Save("Output.pdf");
//close the document
document.Close(true);
'Create a new PDF Document.
Dim document As New PdfDocument()
'Create a new page.
Dim page As PdfPage = document.Pages.Add()
'Create a new rectangle
Dim popupAnnotationRectangle As New RectangleF(10, 40, 30, 30)
'Create a new popup annotation.
Dim popupAnnotation As New PdfPopupAnnotation(popupAnnotationRectangle, "Test popup annotation")
'Set the annotation border to popup annotation.
popupAnnotation.Border = New PdfAnnotationBorder(4, 0, 0)
'Add this annotation to a new page.
page.Annotations.Add(popupAnnotation)
'Save the document to disk.
document.Save("Output.pdf")
'close the document
document.Close(True)
Remarks
This PdfAnnotationBorder class is used to create the annotation border to PdfPopupAnnotation. Please refer the UG docuemntation link
Constructors
PdfAnnotationBorder()
Initializes a new instance of the PdfAnnotationBorder class.
public PdfAnnotationBorder()
Examples
//Create a new PDF Document.
PdfDocument document = new PdfDocument();
//Create a new page.
PdfPage page = document.Pages.Add();
//Create a new rectangle
RectangleF popupAnnotationRectangle = new RectangleF(10, 40, 30, 30);
//Create a new popup annotation.
PdfPopupAnnotation popupAnnotation = new PdfPopupAnnotation(popupAnnotationRectangle, "Test popup annotation");
//Set the annotation border.
popupAnnotation.Border = new PdfAnnotationBorder();
//Add this annotation to a new page.
page.Annotations.Add(popupAnnotation);
//Save the document to disk.
document.Save("Output.pdf");
//close the document
document.Close(true);
'Create a new PDF Document.
Dim document As New PdfDocument()
'Create a new page.
Dim page As PdfPage = document.Pages.Add()
'Create a new rectangle
Dim popupAnnotationRectangle As New RectangleF(10, 40, 30, 30)
'Create a new popup annotation.
Dim popupAnnotation As New PdfPopupAnnotation(popupAnnotationRectangle, "Test popup annotation")
'Set the annotation border.
popupAnnotation.Border = New PdfAnnotationBorder()
'Add this annotation to a new page.
page.Annotations.Add(popupAnnotation)
'Save the document to disk.
document.Save("Output.pdf")
'close the document
document.Close(True)
- See Also
PdfAnnotationBorder(float)
Initializes a new instance of the PdfAnnotationBorder class with specified border width.
public PdfAnnotationBorder(float borderWidth)
Parameters
borderWidth
floatA float value specifying the width of the annotation's border.
Examples
//Create a new PDF Document.
PdfDocument document = new PdfDocument();
//Create a new page.
PdfPage page = document.Pages.Add();
//Create a new rectangle
RectangleF popupAnnotationRectangle = new RectangleF(10, 40, 30, 30);
//Create a new popup annotation.
PdfPopupAnnotation popupAnnotation = new PdfPopupAnnotation(popupAnnotationRectangle, "Test popup annotation");
//Set the annotation border.
popupAnnotation.Border = new PdfAnnotationBorder(4);
//Add this annotation to a new page.
page.Annotations.Add(popupAnnotation);
//Save the document to disk.
document.Save("Output.pdf");
//close the document
document.Close(true);
'Create a new PDF Document.
Dim document As New PdfDocument()
'Create a new page.
Dim page As PdfPage = document.Pages.Add()
'Create a new rectangle
Dim popupAnnotationRectangle As New RectangleF(10, 40, 30, 30)
'Create a new popup annotation.
Dim popupAnnotation As New PdfPopupAnnotation(popupAnnotationRectangle, "Test popup annotation")
'Set the annotation border.
popupAnnotation.Border = New PdfAnnotationBorder(4)
'Add this annotation to a new page.
page.Annotations.Add(popupAnnotation)
'Save the document to disk.
document.Save("AnnotationBorder.pdf")
'close the document
document.Close(True)
- See Also
PdfAnnotationBorder(float, float, float)
Initializes a new instance of the PdfAnnotationBorder class with specified border width, horizontal and vertical radius.
public PdfAnnotationBorder(float borderWidth, float horizontalRadius, float verticalRadius)
Parameters
borderWidth
floatA float value specifying the width of the annotation's border.
horizontalRadius
floatA float value specifying the horizontal corner radius value.
verticalRadius
floatA float value specifying the vertical corner radius value.
Examples
//Create a new PDF Document.
PdfDocument document = new PdfDocument();
//Create a new page.
PdfPage page = document.Pages.Add();
//Create a new rectangle
RectangleF popupAnnotationRectangle = new RectangleF(10, 40, 30, 30);
//Create a new popup annotation.
PdfPopupAnnotation popupAnnotation = new PdfPopupAnnotation(popupAnnotationRectangle, "Test popup annotation");
//Set the annotation border.
popupAnnotation.Border = new PdfAnnotationBorder(4, 0, 0);
//Add this annotation to a new page.
page.Annotations.Add(popupAnnotation);
//Save the document to disk.
document.Save("Output.pdf");
//close the document
document.Close(true);
'Create a new PDF Document.
Dim document As New PdfDocument()
'Create a new page.
Dim page As PdfPage = document.Pages.Add()
'Create a new rectangle
Dim popupAnnotationRectangle As New RectangleF(10, 40, 30, 30)
'Create a new popup annotation.
Dim popupAnnotation As New PdfPopupAnnotation(popupAnnotationRectangle, "Test popup annotation")
'Set the annotation border.
popupAnnotation.Border = New PdfAnnotationBorder(4, 0, 0)
'Add this annotation to a new page.
page.Annotations.Add(popupAnnotation)
'Save the document to disk.
document.Save("Output.pdf")
'close the document
document.Close(True)
- See Also
Properties
HorizontalRadius
Gets or sets a horizontal corner radius.
public float HorizontalRadius { get; set; }
Property Value
- float
The horizontal radius of the annotation.
Examples
//Create a new PDF Document.
PdfDocument document = new PdfDocument();
//Create a new page.
PdfPage page = document.Pages.Add();
//Create a new rectangle
RectangleF popupAnnotationRectangle = new RectangleF(10, 40, 30, 30);
//Create a new popup annotation.
PdfPopupAnnotation popupAnnotation = new PdfPopupAnnotation(popupAnnotationRectangle, "Test popup annotation");
//Set the horizontal radius to popup annotation border.
popupAnnotation.Border.HorizontalRadius = 0;
//Add this annotation to a new page.
page.Annotations.Add(popupAnnotation);
//Save the document to disk.
document.Save("Output.pdf");
//close the document
document.Close(true);
'Create a new PDF Document.
Dim document As New PdfDocument()
'Create a new page.
Dim page As PdfPage = document.Pages.Add()
'Create a new rectangle
Dim popupAnnotationRectangle As New RectangleF(10, 40, 30, 30)
'Create a new popup annotation.
Dim popupAnnotation As New PdfPopupAnnotation(popupAnnotationRectangle, "Test popup annotation")
'Set the horizontal radius to popup annotation border.
popupAnnotation.Border.HorizontalRadius = 0
'Add this annotation to a new page.
page.Annotations.Add(popupAnnotation)
'Save the document to disk.
document.Save("Output.pdf")
'close the document
document.Close(True)
- See Also
VerticalRadius
Gets or sets a vertical corner radius.
public float VerticalRadius { get; set; }
Property Value
- float
The vertical radius of the annotation.
Examples
//Create a new PDF Document.
PdfDocument document = new PdfDocument();
//Create a new page.
PdfPage page = document.Pages.Add();
//Create a new rectangle
RectangleF popupAnnotationRectangle = new RectangleF(10, 40, 30, 30);
//Create a new popup annotation.
PdfPopupAnnotation popupAnnotation = new PdfPopupAnnotation(popupAnnotationRectangle, "Test popup annotation");
//Set the vertical radius to popup annotation border.
popupAnnotation.Border.VerticalRadius = 0;
//Add popup annotation to a new page.
page.Annotations.Add(popupAnnotation);
//Save the document to disk.
document.Save("Output.pdf");
//close the document
document.Close(true);
'Create a new PDF Document.
Dim document As New PdfDocument()
'Create a new page.
Dim page As PdfPage = document.Pages.Add()
'Create a new rectangle
Dim popupAnnotationRectangle As New RectangleF(10, 40, 30, 30)
'Create a new popup annotation.
Dim popupAnnotation As New PdfPopupAnnotation(popupAnnotationRectangle, "Test popup annotation")
'Set the vertical radius to popup annotation border.
popupAnnotation.Border.VerticalRadius = 0
'Add popup annotation to a new page.
page.Annotations.Add(popupAnnotation)
'Save the document to disk.
document.Save("Output.pdf")
'close the document
document.Close(True)
- See Also
Width
Gets or sets the width of annotation's border.
public float Width { get; set; }
Property Value
- float
A float value specifying the width of the annotation's border.
Examples
//Create a new PDF Document.
PdfDocument document = new PdfDocument();
//Create a new page.
PdfPage page = document.Pages.Add();
//Create a new rectangle
RectangleF popupAnnotationBounds = new RectangleF(10, 40, 30, 30);
//Create a new popup annotation.
PdfPopupAnnotation popupAnnotation = new PdfPopupAnnotation(popupAnnotationBounds, "Test popup annotation");
//Set the width to popup annotation border.
popupAnnotation.Border.Width = 4;
//Add popup annotation annotation to a new page.
page.Annotations.Add(popupAnnotation);
//Save the document to disk.
document.Save("Output.pdf");
//close the document
document.Close(true);
'Create a new PDF Document.
Dim document As New PdfDocument()
'Create a new page.
Dim page As PdfPage = document.Pages.Add()
'Create a new rectangle
Dim popupAnnotationBounds As New RectangleF(10, 40, 30, 30)
'Create a new popup annotation.
Dim popupAnnotation As New PdfPopupAnnotation(popupAnnotationBounds, "Test popup annotation")
'Set the width to popup annotation border.
popupAnnotation.Border.Width = 4
'Add popup annotation to a new page.
page.Annotations.Add(popupAnnotation)
'Save the document to disk.
document.Save("Output.pdf")
'close the document
document.Close(True)
- See Also