Skip to content

modern-pdf-lib


modern-pdf-lib / ByteWriter

Interface: ByteWriter

Defined in: src/core/pdfObjects.ts:21

Minimal interface consumed by every serialize() method. Implementations may write to a growing Uint8Array, a WritableStream, etc.

Methods

write()

write(data): void

Defined in: src/core/pdfObjects.ts:23

Append raw bytes.

Parameters

data

Uint8Array

Returns

void


writeString()

writeString(str): void

Defined in: src/core/pdfObjects.ts:25

Append an ASCII / Latin-1 string — callers guarantee all chars < 0x100.

Parameters

str

string

Returns

void

Released under the MIT License.