Skip to main content
Version: Version 5

Class: ListBoxWidget

A list box widget annotation.

Extends

Constructors

Constructor

new ListBoxWidget(options): ListBoxWidget

Creates a new ListBoxWidget instance.

Parameters

options

ListBoxWidgetOptions

Options used to initialize the list box widget.

Returns

ListBoxWidget

Overrides

WidgetAnnotation.constructor

Properties

action

action: Action

The action that is performed when the widget annotation is clicked on

Inherited from

WidgetAnnotation.action

Accessors

boundingBox

Get Signature

get boundingBox(): Rectangle<PdfPoint>

Represents the bounding box of the annotation, which defines its position and size on the page. The bounding box is specified as a Rectangle of PdfPoint coordinates.

Returns

Rectangle<PdfPoint>

Set Signature

set boundingBox(rectangle): void

Parameters
rectangle

Rectangle<PdfPoint>

Returns

void

Inherited from

WatermarkAnnotation.boundingBox


content

Get Signature

get content(): string

Text that shall be displayed for the annotation or, if this type of annotation does not display text, an alternative description of the annotation’s contents in human-readable form.

Returns

string

Set Signature

set content(content): void

Parameters
content

string

Returns

void

Inherited from

WatermarkAnnotation.content


dateModified

Get Signature

get dateModified(): Date

Experimental

The date and time when the annotation was most recently modified.

Returns

Date

Set Signature

set dateModified(date): void

Parameters
date

Date

Returns

void

Inherited from

WidgetAnnotation.dateModified


hasChanges

Get Signature

get hasChanges(): boolean

Experimental

Indicates if the annotation has been changed since the document was opened

Returns

boolean

Inherited from

WidgetAnnotation.hasChanges


hidden

Get Signature

get hidden(): boolean

If set to true, the annotation will not be displayed or printed, and it will not allow interaction with the user.

Returns

boolean

Set Signature

set hidden(hidden): void

Parameters
hidden

boolean

Returns

void

Inherited from

WidgetAnnotation.hidden


id

Get Signature

get id(): void

Experimental

A unique identifier for the annotation.

Returns

void

Inherited from

WatermarkAnnotation.id


interactive

Get Signature

get interactive(): boolean

Specifies whether the annotation allows user interaction.

Returns

boolean

Set Signature

set interactive(interactive): void

Parameters
interactive

boolean

Returns

void

Inherited from

WidgetAnnotation.interactive


isAdded

Get Signature

get isAdded(): boolean

Experimental

Indicates whether the annotation was added to a page

Returns

boolean

Inherited from

WidgetAnnotation.isAdded


isMaintainingAspectRatio

Get Signature

get isMaintainingAspectRatio(): boolean

Indicates if the annotation is maintaining its aspect ratio

Returns

boolean

Inherited from

WidgetAnnotation.isMaintainingAspectRatio


isMarkupAnnotation

Get Signature

get isMarkupAnnotation(): boolean

Indicates if the annotation is a markup annotation

Returns

boolean

Inherited from

WidgetAnnotation.isMarkupAnnotation


isModified

Get Signature

get isModified(): boolean

Experimental

Indicates if the annotation has changes that have not yet been saved to the document

Returns

boolean

Inherited from

WidgetAnnotation.isModified


isMoveable

Get Signature

get isMoveable(): boolean

Indicates if the annotation can be moved by the user

Returns

boolean

Inherited from

WidgetAnnotation.isMoveable


isMultiSelectAllowed

Get Signature

get isMultiSelectAllowed(): boolean

Indicates whether multiple options can be selected.

Returns

boolean


isResizable

Get Signature

get isResizable(): boolean

Indicates if the annotation can be resized by the user

Returns

boolean

Inherited from

WidgetAnnotation.isResizable


isRotatable

Get Signature

get isRotatable(): boolean

Indicates if the annotation can be rotated by the user

Returns

boolean

Inherited from

WidgetAnnotation.isRotatable


isSelectable

Get Signature

get isSelectable(): boolean

Indicates if the annotation can be selected by the user

Returns

boolean

Inherited from

WidgetAnnotation.isSelectable


isWidgetAnnotation

Get Signature

get isWidgetAnnotation(): boolean

Indicates if the annotation is a widget annotation

Returns

boolean

Inherited from

WidgetAnnotation.isWidgetAnnotation


locked

Get Signature

get locked(): AnnotationLockedState

Represents the locked state of the annotation.

Returns

AnnotationLockedState

Set Signature

set locked(locked): void

Parameters
locked

AnnotationLockedState

Returns

void

Inherited from

WidgetAnnotation.locked


options

Get Signature

get options(): string[]

The available options in the list box.

Returns

string[]


page

Get Signature

get page(): Page

Page in which the annotation is embedded.

Returns

Page

Set Signature

set page(page): void

Set the page in which the annotation is embedded.

Parameters
page

Page

The page to set as the annotation’s page.

Returns

void

Inherited from

WidgetAnnotation.page


pageNumber

Get Signature

get pageNumber(): number

Experimental

Number of the page in which the annotation is embedded.

Returns

number

Inherited from

WidgetAnnotation.pageNumber


privateData

Get Signature

get privateData(): string

Custom data to be stored with the annotation. This can be used to store any additional information relevant to the annotation that is not covered by the standard properties.

Returns

string

Set Signature

set privateData(privateData): void

Parameters
privateData

string

Custom data to be stored with the annotation.

Returns

void

Inherited from

WidgetAnnotation.privateData


renderProperties

Get Signature

get renderProperties(): AnnotationRenderProperties

Object which encapsulates the rendering properties of a PDF annotation, providing a set of flags that control its visibility, interactivity, and other rendering behaviors.

Returns

AnnotationRenderProperties

Set Signature

set renderProperties(v): void

Parameters
v

AnnotationRenderProperties

Returns

void

Inherited from

WidgetAnnotation.renderProperties


source

Get Signature

get source(): void

Experimental

Tag that identifies the source the annotation is coming from, if the source is an input PDF or an input FDF. Newly created annotations always return null.

Returns

void

Inherited from

WatermarkAnnotation.source


type

Get Signature

get type(): AnnotationType

The PDF annotation type

Default Value

AnnotationType.ListBox

Returns

AnnotationType

Overrides

WidgetAnnotation.type


value

Get Signature

get value(): string[]

The currently selected option values. Similar to HTML select element’s value API.

Returns

string[]

Set Signature

set value(values): void

Parameters
values

string[]

Returns

void

Methods

dispose()

dispose(): void

Disposes of the object, releasing any resources it holds.

The dispose method is responsible for performing cleanup operations and releasing any resources acquired by the object. Once an object is disposed, it should not be used, and attempts to do so may result in undefined behavior.

Returns

void

Inherited from

WidgetAnnotation.dispose