Class PdfFileAnnotation
Represents a base class for file attachment annotation.
Inheritance
System.Object
PdfFileAnnotation
Implements
System.ComponentModel.INotifyPropertyChanged
Inherited Members
Namespace: Syncfusion.Pdf.Interactive
Assembly: Syncfusion.Pdf.NET.dll
Syntax
public abstract class PdfFileAnnotation : PdfAnnotation, IPdfWrapper, INotifyPropertyChanged
Constructors
PdfFileAnnotation()
Initializes a new instance of the PdfFileAnnotation class.
Declaration
protected PdfFileAnnotation()
PdfFileAnnotation(RectangleF)
Initializes a new instance of the PdfFileAnnotation class with specified bounds.
Declaration
protected PdfFileAnnotation(RectangleF rectangle)
Parameters
Type | Name | Description |
---|---|---|
RectangleF | rectangle | Bounds of the annotation. |
Properties
Appearance
Gets or sets the appearance of the annotation.
Declaration
public PdfAppearance Appearance { get; set; }
Property Value
Type |
---|
PdfAppearance |
Examples
//Create the PDF document
PdfDocument document = new PdfDocument();
//Create a new page .
PdfPage page = document.Pages.Add();
//Create a font
PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 10);
//Create a brush
PdfBrush brush = PdfBrushes.Blue;
//Create a new pdf3d annotation.
Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
//Create a new pdf appearance
annot.Appearance = new PdfAppearance(annotation);
annot.Appearance.Normal.Graphics.DrawString("Click to activate", font, brush, new PointF(40, 40));
//Add this annotation to a new page
annot.Appearance.Normal.Draw(page, new PointF(annot.Location.X, annot.Location.Y));
//Save the document to disk.
document.Save("Output.pdf");
//close the document
document.Close(true);
'Create the PDF document
Dim document As New PdfDocument()
'Create a new page .
Dim page As PdfPage = document.Pages.Add()
'Create a font
Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 10)
'Create a brush
Dim brush As PdfBrush = PdfBrushes.Blue
'Create a new pdf3d annotation.
Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
'Create a new PDF appearance.
annot.Appearance = New PdfAppearance(annotation)
annot.Appearance.Normal.Graphics.DrawString("Click to activate", font, brush, New PointF(40, 40))
'Add this annotation to a new page
annot.Appearance.Normal.Draw(page, New PointF(annot.Location.X, annot.Location.Y))
'Save the document to disk.
document.Save("Output.pdf")
'close the document
document.Close(True)
See Also
FileName
Gets or sets file name of the annotation.
Declaration
public abstract string FileName { get; set; }
Property Value
Type |
---|
System.String |
Examples
//Create the PDF document
PdfDocument document = new PdfDocument();
//Create a new page .
PdfPage page = document.Pages.Add();
//Create a font
PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 10);
//Create a brush
PdfBrush brush = PdfBrushes.Blue;
//Create a new pdf3d annotation.
Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
//Get file name of the annotation.
string fileName = annotation.FileName;
//Save the document to disk.
document.Save("Output.pdf");
//close the document
document.Close(true);
'Create the PDF document
Dim document As New PdfDocument()
'Create a new page .
Dim page As PdfPage = document.Pages.Add()
'Create a font
Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 10)
'Create a brush
Dim brush As PdfBrush = PdfBrushes.Blue
'Create a new pdf3d annotation.
Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
'Get file name of the annotation.
Dim fileName As String = annotation.FileName
'Save the document to disk.
document.Save("Output.pdf")
'close the document
document.Close(True)
See Also
Methods
Save()
Saves an annotation.
Declaration
protected override void Save()
Overrides
Implements
System.ComponentModel.INotifyPropertyChanged