[]
        
(Showing Draft Content)

DestinationFit

DsPdfJS API v9.1.0


DsPdfJS API / DestinationFit

Class: DestinationFit

Display the page designated by Destination#page, with its contents magnified just enough to fit the entire page within the window both horizontally and vertically. If the required horizontal and vertical magnification factors are different, use the smaller of the two, centering the page within the window in the other dimension.

Extends

Constructors

Constructor

new DestinationFit(om, pageIndex): DestinationFit

Initializes a new instance of the DestinationFit class.

Parameters

om

ObjectManager

ObjectManager that controls the lifetime of the DestinationFit.

pageIndex

number

The target page index.

Returns

DestinationFit

Overrides

Destination.constructor

Constructor

new DestinationFit(pageIndex): DestinationFit

Initializes a new instance of the DestinationFit class.

Parameters

pageIndex

number

The target page index.

Returns

DestinationFit

Overrides

Destination.constructor

Constructor

new DestinationFit(om, page): DestinationFit

Initializes a new instance of the DestinationFit class.

Parameters

om

ObjectManager

ObjectManager that controls the lifetime of the DestinationFit.

page

PdfPage

The target PdfPage.

Returns

DestinationFit

Overrides

Destination.constructor

Constructor

new DestinationFit(page): DestinationFit

Initializes a new instance of the DestinationFit class.

Parameters

page

PdfPage

The target PdfPage.

Returns

DestinationFit

Overrides

Destination.constructor

Accessors

id

Get Signature

get id(): number

Gets the reference to the object.

Returns

number

Inherited from

Destination.id


om

Get Signature

get om(): ObjectManager

Gets the owner ObjectManager instance.

Returns

ObjectManager

Inherited from

Destination.om


page

Get Signature

get page(): PdfPage | null

Gets this destination's target PdfPage object. Returns null if the target page was specified by index.

Returns

PdfPage | null

Inherited from

Destination.page


pageIndex

Get Signature

get pageIndex(): number | null

Gets the index of this destination's target page. Returns null if the target page was specified as a PdfPage object.

Note that if this property is not null, then any Y coordinate is relative to the bottom left corner (see Destination description for details).

Returns

number | null

Inherited from

Destination.pageIndex

Methods

free()

free(): void

Detaches the object from the ObjectManager and deallocates its memory, if possible.

Returns

void

Inherited from

Destination.free


rebind()

rebind(omTo): void

Rebinds the object from the current ObjectManager to the specified one.

Parameters

omTo

ObjectManager

The new ObjectManager for the object.

Returns

void

Inherited from

Destination.rebind