Search Results for

    Show / Hide Table of Contents

    Class TextAnnotation

    Defines a Sticky-Note style PDF annotation. IronSoftware.Pdfium.PdfiumInterop.UnmanagedDelegates.AddTextAnnotation

    Inheritance
    System.Object
    PdfClientAccessor
    TextAnnotation
    Implements
    IAnnotation
    Namespace: IronPdf.Annotations
    Assembly: IronPdf.dll
    Syntax
    public class TextAnnotation : PdfClientAccessor, IAnnotation

    Constructors

    TextAnnotation(Int32)

    Define a new annotation with the specified parameters. Annotation must be added to the document via PdfDocument.Annotations

    Declaration
    public TextAnnotation(int PageIndex)
    Parameters
    Type Name Description
    System.Int32 PageIndex

    Page index

    TextAnnotation(Int32, String, String)

    Define a new annotation with the specified parameters. Annotation must be added to the document via PdfDocument.Annotations

    Declaration
    public TextAnnotation(int PageIndex, string Title, string Contents)
    Parameters
    Type Name Description
    System.Int32 PageIndex

    Page index

    System.String Title

    Annotation title

    System.String Contents

    Annotation contents

    TextAnnotation(String, String)

    Define a new annotation with the specified parameters. Annotation must be added to the document via PdfDocument.Annotations

    Declaration
    public TextAnnotation(string Title, string Contents)
    Parameters
    Type Name Description
    System.String Title

    Annotation title

    System.String Contents

    Annotation contents

    Properties

    AnnotationIndex

    Index of the annotation on a page. The first page has a annotation_index of 0

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

    Color

    The color of the annotation's 'Sticky Note' Note: Google Chrome PDF Viewer may not respect this color.
    However, Adobe PDF Viewer and Foxit PDF Viewer display the color correctly.

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

    Contents

    The contents of the 'sticky note' annotation

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

    Height

    Annotation visible height Note: Google Chrome or Adobe PDF Viewer may not respect this height.
    However, Foxit PDF Viewer handles the height correctly.

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

    Hidden

    Hides the annotation from users

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

    Opacity

    The opacity of the annotation (valid values are from 0.0 to 1.0)

    Declaration
    public double Opacity { get; set; }
    Property Value
    Type Description
    System.Double

    OpenByDefault

    Sets the annotation to be opened and readable by default, without user interaction

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

    PageIndex

    Index of the page to add the annotation. The first page has a page_index of 0

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

    Printable

    Allows the annotation to be printed when users print the PDF

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

    ReadOnly

    Allows the annotation to be printed when users print the PDF

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

    Rectangle

    The position and size of annotation.
    Note: Google Chrome or Adobe PDF Viewer may not respect the width and height.
    However, Foxit PDF Viewer handles the position and size correctly.

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

    Rotatable

    Allows the annotation to be rotated. E.g. when the containing page os rotated

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

    Subject

    The sub title of the annotation as displayed in the header of the 'sticky note'

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

    Title

    The main title of the annotation as displayed in the header of the 'sticky note'

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

    Width

    Annotation visible width Note: Google Chrome or Adobe PDF Viewer may not respect this width.
    However, Foxit PDF Viewer handles the width correctly.

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

    X

    The horizontal X position of the annotation on your page in pixels

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

    Y

    The vertical Y position of the annotation on your page in pixels. Measured from bottom upwards.

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

    Methods

    ToString()

    Returns a System.String that represents this annotation.

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String

    A System.String that represents this instance.

    Implements

    IAnnotation
    ☀
    ☾
    Downloads
    • Download with Nuget
    • Start for Free
    In This Article
    Back to top
    Install with Nuget
    Want to deploy IronPDF to a live project for FREE?
    What’s included?
    30 days of fully-functional product
    Test and share in a live environment
    No watermarks in production
    Get your free 30-day Trial Key instantly.
    No credit card or account creation required
    Your Trial License Key has been emailed to you.
    Download IronPDF free to apply
    your Trial Licenses Key
    Install with NuGet View Licenses
    Licenses from $499. Have a question? Get in touch.