Class PdfFileAnnotation
- Namespace
- Syncfusion.Pdf.Interactive
- Assembly
- Syncfusion.Pdf.Portable.dll
Represents a base class for file attachment annotation.
public abstract class PdfFileAnnotation : PdfAnnotation, INotifyPropertyChanged
- Inheritance
-
PdfFileAnnotation
- Implements
- Derived
- Inherited Members
Constructors
PdfFileAnnotation()
Initializes a new instance of the PdfFileAnnotation class.
protected PdfFileAnnotation()
- See Also
PdfFileAnnotation(RectangleF)
Initializes a new instance of the PdfFileAnnotation class with specified bounds.
protected PdfFileAnnotation(RectangleF rectangle)
Parameters
rectangle
RectangleFBounds of the annotation.
- See Also
Properties
Appearance
Gets or sets the appearance of the annotation.
public PdfAppearance Appearance { get; set; }
Property Value
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.
public abstract string FileName { get; set; }
Property Value
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.
protected override void Save()
- See Also