Documentation

ObjectParser
in package

Pdf extract object parser class

Tags
category

Pop

author

Nick Sagona, III nick@popphp.org

copyright

Copyright (c) 2009-2026 Nick Sagona, III

license

https://www.popphp.org/license New BSD License

version
6.0.0

Table of Contents

Constants

MAX_DEPTH  = 64
Maximum array/dict nesting depth

Properties

$tokenizer  : Tokenizer
Tokenizer feeding this parser

Methods

__construct()  : mixed
Constructor
parseValue()  : mixed
Parse the next value from the tokenizer
isEndstreamAt()  : bool
Determine if the 'endstream' keyword appears at (or after whitespace from) a position
parseArray()  : array<string|int, mixed>
Parse an array
parseDictOrStream()  : mixed
Parse a dictionary, or a stream if the dictionary is followed by 'stream'
parseNumberOrReference()  : int|float|Reference
Parse a number, disambiguating a plain number from an "N G R" indirect reference
parseStreamData()  : Stream
Parse the raw bytes of a stream, honoring /Length when trustworthy
parseValueFromToken()  : mixed
Parse a value from an already-read token

Constants

MAX_DEPTH

Maximum array/dict nesting depth

protected mixed MAX_DEPTH = 64

Properties

Methods

parseValue()

Parse the next value from the tokenizer

public parseValue() : mixed
Tags
throws
Exception

isEndstreamAt()

Determine if the 'endstream' keyword appears at (or after whitespace from) a position

protected isEndstreamAt(string $data, int $pos) : bool
Parameters
$data : string
$pos : int
Return values
bool

parseArray()

Parse an array

protected parseArray(int $depth) : array<string|int, mixed>
Parameters
$depth : int
Tags
throws
Exception
Return values
array<string|int, mixed>

parseDictOrStream()

Parse a dictionary, or a stream if the dictionary is followed by 'stream'

protected parseDictOrStream(int $depth) : mixed
Parameters
$depth : int
Tags
throws
Exception

parseNumberOrReference()

Parse a number, disambiguating a plain number from an "N G R" indirect reference

protected parseNumberOrReference(int|float $number) : int|float|Reference
Parameters
$number : int|float
Return values
int|float|Reference

parseStreamData()

Parse the raw bytes of a stream, honoring /Length when trustworthy

protected parseStreamData(array<string|int, mixed> $dict) : Stream
Parameters
$dict : array<string|int, mixed>
Tags
throws
Exception
Return values
Stream

parseValueFromToken()

Parse a value from an already-read token

protected parseValueFromToken(array<string|int, mixed> $token, int $depth) : mixed
Parameters
$token : array<string|int, mixed>
$depth : int
Tags
throws
Exception

        
On this page

Search results