ObjectMap

Tracks the mapping from source object references to destination PDF object numbers and maintains a queue of objects that still need to be serialized into the output PDF.

Namespace: Com\Tecnick\Pdf\Import

File: ObjectMap.php line 35

Tracks the mapping from source object references to destination PDF object numbers and maintains a queue of objects that still need to be serialized into the output PDF.

Tags

Methods

allocate()

File: ObjectMap.php line 92

public allocate(string $srcRef, int &$pon) : int

If the source reference is already mapped, returns the existing number.

Parameters

  • $srcRef : string: Source object reference.
  • $pon : int: Current PDF object number counter (modified in place).

Return values

int —

The allocated destination object number.

enqueue()

File: ObjectMap.php line 124

public enqueue(string $srcRef, string $pdfData) : void

Parameters

  • $srcRef : string: Source object reference.
  • $pdfData : string: Serialized PDF object data.

flush()

File: ObjectMap.php line 136

public flush() : string

Clears the queue.

Return values

string —

Concatenated PDF object data for all queued objects.

get()

File: ObjectMap.php line 113

public get(string $srcRef) : int

Parameters

  • $srcRef : string: Source object reference.

Tags

Return values

int —

Destination object number.

getMap()

File: ObjectMap.php line 152

public getMap() : array<string, int>

Return values

array<string, int>

has()

File: ObjectMap.php line 66

public has(string $srcRef) : bool

Parameters

  • $srcRef : string: Source object reference (e.g. “3_0”).

Return values

bool —

True if already mapped.

isInProgress()

File: ObjectMap.php line 78

public isInProgress(string $srcRef) : bool

Parameters

  • $srcRef : string: Source object reference.

Return values

bool —

True if in progress.