menu

ASP.NET Web Forms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PdfFileAnnotation

    Show / Hide Table of Contents

    Class PdfFileAnnotation

    Represents a base class for file attachment annotation.

    Inheritance
    System.Object
    PdfAnnotation
    PdfFileAnnotation
    Pdf3DAnnotation
    PdfAttachmentAnnotation
    PdfSoundAnnotation
    Implements
    System.ComponentModel.INotifyPropertyChanged
    Inherited Members
    PdfAnnotation.SetAppearance(Boolean)
    PdfAnnotation.Initialize()
    PdfAnnotation.CalculateBounds(RectangleF, PdfPage, PdfLoadedPage)
    PdfAnnotation.SetValues(String, String)
    PdfAnnotation.CalculateTemplateBounds(RectangleF, PdfPageBase, PdfTemplate)
    PdfAnnotation.CalculateTemplateBounds(RectangleF, PdfPageBase, PdfTemplate, Boolean, PdfGraphics)
    PdfAnnotation.CalculateTemplateBounds(RectangleF, PdfPageBase, PdfTemplate, Boolean)
    PdfAnnotation.CheckFlatten()
    PdfAnnotation.Color
    PdfAnnotation.Opacity
    PdfAnnotation.InnerColor
    PdfAnnotation.Border
    PdfAnnotation.Bounds
    PdfAnnotation.Location
    PdfAnnotation.Size
    PdfAnnotation.Page
    PdfAnnotation.Text
    PdfAnnotation.Author
    PdfAnnotation.Subject
    PdfAnnotation.ModifiedDate
    PdfAnnotation.AnnotationFlags
    PdfAnnotation.Flatten
    PdfAnnotation.FlattenPopUps
    PdfAnnotation.PdfTag
    PdfAnnotation.Layer
    PdfAnnotation.Rotate
    PdfAnnotation.Name
    PdfAnnotation.PropertyChanged
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.Pdf.Interactive
    Assembly: Syncfusion.Pdf.Base.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
    System.Drawing.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 Description
    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
    PdfPage
    Pdf3DAnnotation

    FileName

    Gets or sets file name of the annotation.

    Declaration
    public abstract string FileName { get; set; }
    Property Value
    Type Description
    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
    PdfPage
    Pdf3DAnnotation

    Methods

    Save()

    Saves an annotation.

    Declaration
    protected override void Save()
    Overrides
    PdfAnnotation.Save()

    Implements

    System.ComponentModel.INotifyPropertyChanged

    See Also

    PdfSoundAnnotation
    Pdf3DAnnotation
    PdfAttachmentAnnotation
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved