DsPdfJS API - v9.1.0
    Preparing search index...

    Class FileAttachmentAnnotation

    Represents a reference to a file which typically is embedded in the PDF file.

    Hierarchy (View Summary)

    Index

    Constructors

    Accessors

    • get color(): Color

      Gets or sets the annotation color, it used as color of popup window, lines color etc.

      Returns Color

    • set color(value: Color): void

      Gets or sets the annotation color, it used as color of popup window, lines color etc.

      Parameters

      Returns void

    • get contents(): string | null

      Gets or sets the text to be displayed for the annotation or, if this type of annotation does not display text, an alternate description of the annotation's contents in human-readable form. In either case, this text is useful when extracting the document's contents in support of accessibility to users with disabilities or for other purposes.

      Returns string | null

    • set contents(value: string | null): void

      Gets or sets the text to be displayed for the annotation or, if this type of annotation does not display text, an alternate description of the annotation's contents in human-readable form. In either case, this text is useful when extracting the document's contents in support of accessibility to users with disabilities or for other purposes.

      Parameters

      • value: string | null

      Returns void

    • get creationDate(): PdfDateTime | null

      Gets or sets the date and time when the annotation was created.

      Returns PdfDateTime | null

    • set creationDate(value: PdfDateTime | null): void

      Gets or sets the date and time when the annotation was created.

      Parameters

      Returns void

    • get flags(): AnnotationFlags

      Gets or sets the flags specifying various characteristics of the annotation.

      Returns AnnotationFlags

    • set flags(value: AnnotationFlags): void

      Gets or sets the flags specifying various characteristics of the annotation.

      Parameters

      Returns void

    • get icon(): string | null

      Gets or sets the type of the icon used to display the annotation, the standard icons: "Paperclip", "PushPin", "Tag", "Graph".

      Returns string | null

    • set icon(value: FileAttachmentAnnotationIcon): void

      Gets or sets the type of the icon used to display the annotation, the standard icons: "Paperclip", "PushPin", "Tag", "Graph".

      Returns void

    • get id(): number

      Gets the reference to the object.

      Returns number

    • get locked(): boolean

      Gets or sets a value indicating whether the annotation can be deleted or its properties (including position and size) can be modified by the user. However, this flag does not restrict changes to the annotation's contents, such as the value of a form field.

      Returns boolean

    • set locked(value: boolean): void

      Gets or sets a value indicating whether the annotation can be deleted or its properties (including position and size) can be modified by the user. However, this flag does not restrict changes to the annotation's contents, such as the value of a form field.

      Parameters

      • value: boolean

      Returns void

    • get lockedContents(): boolean

      Gets or sets a value indicating whether the contents of the annotation can be modified by the user. This flag does not restrict deletion of the annotation or changes to other annotation properties, such as position and size.

      Returns boolean

    • set lockedContents(value: boolean): void

      Gets or sets a value indicating whether the contents of the annotation can be modified by the user. This flag does not restrict deletion of the annotation or changes to other annotation properties, such as position and size.

      Parameters

      • value: boolean

      Returns void

    • get modifiedDate(): PdfDateTime | null

      Gets or sets the date and time when the annotation was modified.

      Returns PdfDateTime | null

    • set modifiedDate(value: PdfDateTime | null): void

      Gets or sets the date and time when the annotation was modified.

      Parameters

      Returns void

    • get name(): string | null

      Gets or sets the annotation name, a text string uniquely identifying it among all annotations on its page.

      Returns string | null

    • set name(value: string | null): void

      Gets or sets the annotation name, a text string uniquely identifying it among all annotations on its page.

      Parameters

      • value: string | null

      Returns void

    • get opacity(): number

      Gets or sets the opacity value to be used in painting the annotation. This value applies to all visible elements of the annotation in its closed state (including its background and border) but not to the pop-up window that appears when the annotation is opened.

      Returns number

    • set opacity(value: number): void

      Gets or sets the opacity value to be used in painting the annotation. This value applies to all visible elements of the annotation in its closed state (including its background and border) but not to the pop-up window that appears when the annotation is opened.

      Parameters

      • value: number

      Returns void

    • get page(): PdfPage | null

      Gets or sets the PdfPage that contains this annotation. Note that an annotation may be referenced by several pages. In that case this property returns the first element in the pages collection. When setting this property, the following applies: If the new value is null, this annotation is removed from all pages. Otherwise, this annotation is assigned exclusively to the specified page.

      Returns PdfPage | null

    • set page(value: PdfPage | null): void

      Gets or sets the PdfPage that contains this annotation. Note that an annotation may be referenced by several pages. In that case this property returns the first element in the pages collection. When setting this property, the following applies: If the new value is null, this annotation is removed from all pages. Otherwise, this annotation is assigned exclusively to the specified page.

      Parameters

      Returns void

    • get pdfRect(): Rect

      Gets or sets the rectangle that defines the location and size of the annotation on a page in PDF user space coordinates. The positive X axis extends horizontally to the right, and the positive Y axis extends vertically upward, with the origin usually in the lower left corner of the page.

      Returns Rect

      rect

    • set pdfRect(value: Rect): void

      Gets or sets the rectangle that defines the location and size of the annotation on a page in PDF user space coordinates. The positive X axis extends horizontally to the right, and the positive Y axis extends vertically upward, with the origin usually in the lower left corner of the page.

      Parameters

      Returns void

      rect

    • get rect(): Rect

      Gets or sets the rectangle that defines the location and size of the annotation on a page. The coordinates of the rectangle are relative to the upper left corner of the page's media box, with the Y (vertical) coordinates increasing from top to bottom. Note that if the annotation is associated with more than one page, the media box of the first of those pages is used to calculate the rectangle's location.

      Returns Rect

    • set rect(value: Rect): void

      Gets or sets the rectangle that defines the location and size of the annotation on a page. The coordinates of the rectangle are relative to the upper left corner of the page's media box, with the Y (vertical) coordinates increasing from top to bottom. Note that if the annotation is associated with more than one page, the media box of the first of those pages is used to calculate the rectangle's location.

      Parameters

      Returns void

    • get referenceAnnotation(): MarkupAnnotation | null

      Gets or sets the annotation referenced by this annotation.

      Returns MarkupAnnotation | null

    • set referenceAnnotation(value: MarkupAnnotation | null): void

      Gets or sets the annotation referenced by this annotation.

      Parameters

      Returns void

    • get referenceType(): string

      Gets or sets the relationship (reference type) between this annotation and the annotation specified by the 'referenceAnnotation' property. The referenced annotation should be on the same page with the current annotation. The valid values: "R" (reply), "Group"

      Returns string

    • set referenceType(value: AnnotationReferenceType): void

      Gets or sets the relationship (reference type) between this annotation and the annotation specified by the 'referenceAnnotation' property. The referenced annotation should be on the same page with the current annotation. The valid values: "R" (reply), "Group"

      Parameters

      Returns void

    • get richText(): string

      Gets or sets the text to be displayed in the pop-up window when the annotation is opened. This text can be formatted using HTML tags, see PDF specification for details.

      Returns string

    • set richText(value: string | null): void

      Gets or sets the text to be displayed in the pop-up window when the annotation is opened. This text can be formatted using HTML tags, see PDF specification for details.

      Parameters

      • value: string | null

      Returns void

    • get subject(): string | null

      Gets or sets the text representing a short description of the subject being addressed by the annotation.

      Returns string | null

    • set subject(value: string | null): void

      Gets or sets the text representing a short description of the subject being addressed by the annotation.

      Parameters

      • value: string | null

      Returns void

    • get userName(): string | null

      Gets or sets the text label to be displayed in the title bar of the annotation's pop-up window when open and active. By convention, this entry identifies the user who added the annotation.

      Returns string | null

    • set userName(value: string | null): void

      Gets or sets the text label to be displayed in the title bar of the annotation's pop-up window when open and active. By convention, this entry identifies the user who added the annotation.

      Parameters

      • value: string | null

      Returns void

    Methods

    • Removes all appearance streams associated with the current annotation, and disables generation of appearance steams for this annotation when the document is saved.

      Note that if any property affecting the annotation's appearance 'rect' is then changed, the appearance streams will be regenerated. So this method would usually be called after initializing all annotation's properties.

      Returns void

    • Forces regeneration of the annotation's appearance streams next time the document is saved.

      Returns void