Search Results for

    Show / Hide Table of Contents

    Interface IAnnotation

    PDF document annotation

    Namespace: IronPdf.Annotations
    Assembly: IronPdf.dll
    Syntax
    public interface IAnnotation

    IAnnotation is the contract IronPDF C# code works through for PDF annotations. It represents PDF document annotation, so code can work with PDF annotations uniformly across implementors rather than binding to a concrete type.

    Concrete implementors include LinkAnnotation, TextAnnotation. Code that accepts IAnnotation works uniformly across these implementors, so applications can read or configure C# PDF features without binding to a specific concrete type.

    Most of the usable surface is inherited. The members that carry everyday use of this contract are AnnotationIndex, Color, Contents, DocumentId; consult these first when implementing or consuming IAnnotation.

    using IronPdf;
    
    // IAnnotation is consumed as the API surface for the family of implementors
    void Consume(IAnnotation target)
    {
        // Use members defined on the interface; concrete behavior follows the implementor
    }

    For collection-wide operations and end-to-end examples, see the IronPDF C# documentation for related guides. For collection-wide operations on IAnnotation instances, the IronPDF C# documentation lists the relevant container types and their methods. Concrete behavior depends on which implementor of IAnnotation is returned at runtime; consult the specific class reference for type-specific members. Polymorphic access through IAnnotation lets code work uniformly across the family of implementors, with a cast required only when type-specific behavior is needed. The reference tables below list the full set of members defined on IAnnotation along with any inherited members exposed through the contract. In a typical IronPDF C# workflow, IAnnotation appears as a parameter or return type at the boundary between the application and the IronPDF API. See the methods table below for the complete set of members defined directly on IAnnotation. Implementing IAnnotation directly in application code is uncommon; the typical pattern is to consume instances returned from the IronPDF API. When iterating over a collection of IAnnotation instances, prefer the inherited members for portable code; downcast only when type-specific behavior is required.

    Properties

    AnnotationIndex

    Annotation index (of a given page)

    Declaration
    int AnnotationIndex { get; set; }
    Property Value
    Type Description
    System.Int32

    Color

    Annotation color

    Declaration
    Color Color { get; set; }
    Property Value
    Type Description
    IronSoftware.Drawing.Color

    Contents

    Annotation contents

    Declaration
    string Contents { get; set; }
    Property Value
    Type Description
    System.String

    DocumentId

    Document identifier

    Declaration
    IDocumentId DocumentId { get; set; }
    Property Value
    Type Description
    IronSoftware.Abstractions.Pdf.IDocumentId

    Height

    Annotation height

    Declaration
    int Height { get; set; }
    Property Value
    Type Description
    System.Int32

    Hidden

    Annotation visibility status

    Declaration
    bool Hidden { get; set; }
    Property Value
    Type Description
    System.Boolean

    PageIndex

    Page index

    Declaration
    int PageIndex { get; }
    Property Value
    Type Description
    System.Int32

    Rectangle

    Declaration
    Rectangle Rectangle { get; set; }
    Property Value
    Type Description
    IronSoftware.Drawing.Rectangle

    Title

    Annotation title

    Declaration
    string Title { get; set; }
    Property Value
    Type Description
    System.String

    Width

    Annotation width

    Declaration
    int Width { get; set; }
    Property Value
    Type Description
    System.Int32

    X

    Annotation X position

    Declaration
    int X { get; set; }
    Property Value
    Type Description
    System.Int32

    Y

    Annotation y position

    Declaration
    int Y { get; set; }
    Property Value
    Type Description
    System.Int32
    ☀
    ☾
    Downloads
    • Download with Nuget
    • Start for Free
    In This Article
    Back to top
    Install with Nuget