Skip to content
Lamina PDF
Unreleased

These docs describe changes that aren’t released yet. For the newest release, see the released docs.

RangeSource

Random access to a file whose bytes are fetched on demand (a remote file, a Blob, a file handle). @laminapdf/viewer’s document worker reads a Blob through it too.

readonly optional blockSize?: number

The block size this source prefers fetches aligned to (HTTP: fewer, larger requests).


readonly size: number

The file’s size in bytes.

read(offset, length, options?): Promise<Uint8Array<ArrayBufferLike>>

The length bytes at offset (exactly that many: the file is at least offset + length long). Rejects when signal aborts.

number

number

AbortSignal

Promise<Uint8Array<ArrayBufferLike>>