PageWalker
in package
Pdf extract content page walker class
Tags
Table of Contents
Constants
- MAX_TREE_DEPTH = 64
- Maximum page-tree recursion depth
Methods
- walk() : array<string|int, mixed>
- Walk a document's page tree into a flat, 0-indexed array of PageInfo objects (index 0 = page 1)
- decodeStream() : string
- Decode a content stream through its filter(s)
- resolveContent() : string
- Resolve and decode a page's /Contents into a single content stream string
- walkNode() : void
- Recursively walk one page-tree node, appending PageInfo objects for each Page found
Constants
MAX_TREE_DEPTH
Maximum page-tree recursion depth
protected
mixed
MAX_TREE_DEPTH
= 64
Methods
walk()
Walk a document's page tree into a flat, 0-indexed array of PageInfo objects (index 0 = page 1)
public
static walk(Document $doc[, array<string|int, mixed>|null $pageNumbers = null ][, int|null $pageLimit = null ]) : array<string|int, mixed>
Parameters
- $doc : Document
- $pageNumbers : array<string|int, mixed>|null = null
- $pageLimit : int|null = null
Tags
Return values
array<string|int, mixed>decodeStream()
Decode a content stream through its filter(s)
protected
static decodeStream(Stream $stream[, Budget|null $budget = null ]) : string
Parameters
Tags
Return values
stringresolveContent()
Resolve and decode a page's /Contents into a single content stream string
protected
static resolveContent(Document $doc, array<string|int, mixed> $page) : string
Parameters
- $doc : Document
- $page : array<string|int, mixed>
Tags
Return values
stringwalkNode()
Recursively walk one page-tree node, appending PageInfo objects for each Page found
protected
static walkNode(Document $doc, array<string|int, mixed> $node, array<string|int, mixed> $inherited, array<string|int, mixed> &$result, array<string|int, mixed> &$visited, int $depth, array<string|int, mixed>|null $pageNumberSet, int|null $pageLimit, int &$pageCount) : void
Parameters
- $doc : Document
- $node : array<string|int, mixed>
- $inherited : array<string|int, mixed>
- $result : array<string|int, mixed>
- $visited : array<string|int, mixed>
- $depth : int
- $pageNumberSet : array<string|int, mixed>|null
-
flipped [pageNumber => key] lookup set, or null for "all pages"
- $pageLimit : int|null
- $pageCount : int