# Class LinkAnnotation

Link annotation.

#### Hierarchy

- MarkupAnnotation
  - LinkAnnotation

#####
Index

### Properties

annotationName
annotationType
appearanceColor
borderStyle
color
contents
convertToContent
creationDate
display
hasPopup
id
invisibleFlag
irtAnnotations
isRichContents
locked
modificationDate
opacity
orderIndex
parentAnnotation
parentId
popupId
printableFlag
rect
redacted
redactedBy
referenceAnnotationId
referenceType
rotate
sharedChanges
state
stateModel
subject
subtype
textAlignment
title

## Properties

### annotationName

annotationName: string

Annotation name (NM entry).

Inherited from MarkupAnnotation.annotationName

### annotationType

annotationType: AnnotationTypeCode

Annotation type.

Inherited from MarkupAnnotation.annotationType

### `Optional` appearanceColor

appearanceColor?: string

Appearance color.

Inherited from MarkupAnnotation.appearanceColor

### `Optional` borderStyle

borderStyle?: { dashArray?: number[]; horizontalCornerRadius: number; style: number; verticalCornerRadius: number; width: number }

Annotation's border style.

#### Type declaration

- ##### `Optional` dashArray?: number[]

  Border dash pattern. Used when the border style is dashed.

- ##### horizontalCornerRadius: number

- ##### style: number

  Border style. Possible values: 1 - solid style (default), 2 - dashed style.

- ##### verticalCornerRadius: number

- ##### width: number

  Border width.

Inherited from MarkupAnnotation.borderStyle

### `Optional` color

color?: string

Annotation color.

Inherited from MarkupAnnotation.color

### `Optional` contents

contents?: string

The text (or rich text) string that shall be displayed in the pop-up when the annotation is opened.

Inherited from MarkupAnnotation.contents

### `Optional` convertToContent

convertToContent?: boolean

Indicates whether the annotation will be converted to content when the document is saved.

Inherited from MarkupAnnotation.convertToContent

### creationDate

creationDate: string

Creation date.

Inherited from MarkupAnnotation.creationDate

### `Optional` display

display?: "visible" | "hidden"

The field is used for compatibility with Adobe Acrobat Reader.

Inherited from MarkupAnnotation.display

### hasPopup

hasPopup: boolean

Indicates if annotation has associated popup annotation.

Inherited from MarkupAnnotation.hasPopup

### id

id: string

Annotation id.

Inherited from MarkupAnnotation.id

### invisibleFlag

invisibleFlag: boolean

true if the annotation is hidden.

Inherited from MarkupAnnotation.invisibleFlag

### `Optional` irtAnnotations

irtAnnotations?: AnnotationBase[]

Internal helper property. Primary annotation's children annotations. Note, the array contains all children annotations, including annotations what is not direct descendant of the primary annotation.

Inherited from MarkupAnnotation.irtAnnotations

### isRichContents

isRichContents: boolean

Specifies whether or not the RichContent mode is used for the contents property.

Inherited from MarkupAnnotation.isRichContents

### locked

locked: boolean

Specifies whether the annotation can be deleted or its properties (including position and size) can be modified by the user.

### Example

    var viewer = new DsPdfViewer('#root', { renderInteractiveForms: true , supportApi: { apiUrl: 'api/pdf-viewer', webSocketUrl: false } });
    viewer.addDefaultPanels();
    viewer.addAnnotationEditorPanel();
    viewer.addFormEditorPanel();
    viewer.addReplyTool();
    viewer.onAfterOpen.register(()=>{
        // Lock all text annotations after document open:
        const resultArr = await viewer.findAnnotation(1, // 1 - AnnotationTypeCode.TEXT
                              { findField: 'annotationType',
                      		    pageNumberConstraint: 1, findAll: true });
        viewer.updateAnnotations(0, resultArr.map((data)=> { data.annotation.locked = true; return data.annotation; }));
    });
    // Open Annotations.pdf
    viewer.open('Annotations.pdf');

Inherited from MarkupAnnotation.locked

### modificationDate

modificationDate: string

Modification date.

Inherited from MarkupAnnotation.modificationDate

### `Optional` opacity

opacity?: number

Annotation opacity.

Inherited from MarkupAnnotation.opacity

### orderIndex

orderIndex: number

The field order index.

Inherited from MarkupAnnotation.orderIndex

### `Optional` parentAnnotation

parentAnnotation?: AnnotationBase

Resolved reference to parent annotation.

Inherited from MarkupAnnotation.parentAnnotation

### `Optional` parentId

parentId?: string

Parent annotation id for popup annotation.

Inherited from MarkupAnnotation.parentId

### popupId

popupId: string

Popup annotation identifier.

Inherited from MarkupAnnotation.popupId

### printableFlag

printableFlag: boolean

Specifies whether or not the annotation can be printed.

Inherited from MarkupAnnotation.printableFlag

### rect

rect: number[]

The annotation's bounds rectangle: [x1, y1, x2, y2]. (0, 0) is the bottom left corner of the page.

Inherited from MarkupAnnotation.rect

### redacted

redacted: boolean

Indicates whether the current annotation has been redacted. Redacted annotations will be removed from the document after saving.

Inherited from MarkupAnnotation.redacted

### redactedBy

redactedBy: string

ID of the Redact annotation that was used to redact the current annotation.

Inherited from MarkupAnnotation.redactedBy

### referenceAnnotationId

referenceAnnotationId: string

Id of the primary annotation to which this annotation belongs. ("in reply to" value).

Inherited from MarkupAnnotation.referenceAnnotationId

### referenceType

referenceType: "R" | "Group"

R - this annotation is reply to the primary annotation specified by field referenceAnnotationId. Group - annotation should be grouped with primary annotation specified by field referenceAnnotationId.

Inherited from MarkupAnnotation.referenceType

### `Optional` rotate

rotate?: number

The number of degrees by which the annotation shall be rotated relative to the page.

Inherited from MarkupAnnotation.rotate

### `Optional` sharedChanges

sharedChanges?: { [userName: string]: number }

Hash object with information about users who change this annotation. key - user name value - UNIX UTC timestamp when changes were added.

#### Type declaration

- ##### [userName: string]: number

Inherited from MarkupAnnotation.sharedChanges

### `Optional` state

state?: AnnotationMarkedStateType | AnnotationReviewStateType

Beginning with PDF 1.5, Annotations may have author-specific state associated with them. The state is not specified in the annotation itself but in separate text annotation that refers to the original annotation by means of its 'IRT' ("in reply to") entry.

Inherited from MarkupAnnotation.state

### `Optional` stateModel

stateModel?: AnnotationStateModel

The state model corresponding to state.

Inherited from MarkupAnnotation.stateModel

### subject

subject: string

Text representing a short description of the subject being addressed by the annotation. The 'subject' is the meta information property and it can be used to group, sort or filter annotations.

Inherited from MarkupAnnotation.subject

### subtype

subtype: AnnotationTypeName

Annotation sub-type. Possible values are: 'Text', 'Link', 'FreeText', 'Line', 'Square', 'Circle', 'Polygon', 'PolyLine', 'Highlight', 'Underline', 'Squiggly', 'Strikeout', 'Stamp', 'Caret', 'Ink', 'Popup', 'FileAttachment', 'Sound', 'Movie', 'Widget', 'Screen', 'PrinterMark', 'TrapNet', 'WaterMark', 'Redact', 'Signature', 'ThreadBead', 'RadioButton', 'Checkbox', 'PushButton', 'Choice', 'TextWidget', 'RichMedia'

Inherited from MarkupAnnotation.subtype

### textAlignment

textAlignment: TextAlignmentType

The alignment of the text.

Inherited from MarkupAnnotation.textAlignment

### title

title: string

The text label that shall be displayed in the title bar of the annotation's popup when open and active. This entry shall identify the user who added the annotation.

Inherited from MarkupAnnotation.title