[]
        
(Showing Draft Content)

EmbeddedFileStream

DsPdfJS API v9.1.0


DsPdfJS API / EmbeddedFileStream

Class: EmbeddedFileStream

Represents embedded file stream in PDF.

Extends

Constructors

Constructor

new EmbeddedFileStream(om, bytes): EmbeddedFileStream

Initialize a new instance of the EmbeddedFileStream class.

Parameters

om

ObjectManager

ObjectManager that controls the lifetime of the EmbeddedFileStream.

bytes

Uint8Array

The file data.

Returns

EmbeddedFileStream

Overrides

ObjectBase.constructor

Constructor

new EmbeddedFileStream(bytes): EmbeddedFileStream

Initialize a new instance of the EmbeddedFileStream class.

Parameters

bytes

Uint8Array

The file data.

Returns

EmbeddedFileStream

Overrides

ObjectBase.constructor

Accessors

checkSum

Get Signature

get checkSum(): Uint8Array<ArrayBufferLike> | null

Gets or sets a 16-byte string that is the checksum of the bytes of the uncompressed embedded file. The checksum is calculated by applying the standard MD5 message-digest algorithm to the bytes of the embedded file stream. Checksum calculated automatically when EmbeddedFileStream is created.

Returns

Uint8Array<ArrayBufferLike> | null

Set Signature

set checkSum(value): void

Gets or sets a 16-byte string that is the checksum of the bytes of the uncompressed embedded file. The checksum is calculated by applying the standard MD5 message-digest algorithm to the bytes of the embedded file stream. Checksum calculated automatically when EmbeddedFileStream is created.

Parameters
value

Uint8Array<ArrayBufferLike> | null

Returns

void


creationDate

Get Signature

get creationDate(): PdfDateTime | null

Gets or sets the date and time when the embedded file was created.

Returns

PdfDateTime | null

Set Signature

set creationDate(value): void

Gets or sets the date and time when the embedded file was created.

Parameters
value

PdfDateTime | null

Returns

void


id

Get Signature

get id(): number

Gets the reference to the object.

Returns

number

Inherited from

ObjectBase.id


mimeType

Get Signature

get mimeType(): string | null

Gets or sets the file's MIME type.

Returns

string | null

Set Signature

set mimeType(value): void

Gets or sets the file's MIME type.

Parameters
value

string | null

Returns

void


modificationDate

Get Signature

get modificationDate(): PdfDateTime | null

Gets or sets the date and time when the embedded file was last modified.

Returns

PdfDateTime | null

Set Signature

set modificationDate(value): void

Gets or sets the date and time when the embedded file was last modified.

Parameters
value

PdfDateTime | null

Returns

void


om

Get Signature

get om(): ObjectManager

Gets the owner ObjectManager instance.

Returns

ObjectManager

Inherited from

ObjectBase.om


size

Get Signature

get size(): number | null

Gets or sets the size of the embedded file, in bytes.

Returns

number | null

Set Signature

set size(value): void

Gets or sets the size of the embedded file, in bytes.

Parameters
value

number | null

Returns

void

Methods

free()

free(): void

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

Returns

void

Inherited from

ObjectBase.free


getStream()

getStream(): Uint8Array<ArrayBufferLike> | null

Gets the Uint8Array containing content of this EmbeddedFileStream, stream should be disposed after usage. NOTE! Method can return null if this EmbeddedFileStream is empty.

Returns

Uint8Array<ArrayBufferLike> | null


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

ObjectBase.rebind