Parser
extends AbstractParser
in package
Pdf parser class
Tags
Table of Contents
Properties
- $data : string|null
- Imported PDF data stream
- $file : string|null
- Imported PDF file
- $fonts : array<string|int, mixed>
- Document fonts - retained only for public API compatibility (getFonts()); font resources are now carried per-page via each translated PageObject's own structured font references instead of this document-wide bag.
- $objectMap : array<string|int, mixed>
- Object map - retained only for public API compatibility (getObjectMap()); see $objectStreams.
- $objectStreams : array<string|int, mixed>
- Parsed object data streams - retained only for public API compatibility (getObjectStreams()); no longer populated under the Extract\Document-based implementation, since no consumer depends on its contents (only its array type).
Methods
- getData() : string
- Get the data stream
- getFile() : string
- Get the file
- getFonts() : array<string|int, mixed>
- Get the document fonts
- getObjectMap() : array<string|int, mixed>
- Get the object map
- getObjectStreams() : array<string|int, mixed>
- Get the object streams
- parse() : AbstractDocument
- Parse the data stream
- parseData() : AbstractDocument
- Parse from raw data stream
- parseFile() : AbstractDocument
- Parse from file
- initData() : Parser
- Initialize data
- initFile() : Parser
- Initialize the file and get the data
- kidNumbers() : array<string|int, mixed>
- Extract a rewritten Pages node dict's Kids as a flat list of new object numbers
- metadataFromDict() : Metadata
- Build a Document\Metadata from a rewritten Info dict
Properties
$data
Imported PDF data stream
protected
string|null
$data
= null
$file
Imported PDF file
protected
string|null
$file
= null
$fonts
Document fonts - retained only for public API compatibility (getFonts()); font resources are now carried per-page via each translated PageObject's own structured font references instead of this document-wide bag.
protected
array<string|int, mixed>
$fonts
= []
$objectMap
Object map - retained only for public API compatibility (getObjectMap()); see $objectStreams.
protected
array<string|int, mixed>
$objectMap
= []
$objectStreams
Parsed object data streams - retained only for public API compatibility (getObjectStreams()); no longer populated under the Extract\Document-based implementation, since no consumer depends on its contents (only its array type).
protected
array<string|int, mixed>
$objectStreams
= []
Methods
getData()
Get the data stream
public
getData() : string
Return values
stringgetFile()
Get the file
public
getFile() : string
Return values
stringgetFonts()
Get the document fonts
public
getFonts() : array<string|int, mixed>
Return values
array<string|int, mixed>getObjectMap()
Get the object map
public
getObjectMap() : array<string|int, mixed>
Return values
array<string|int, mixed>getObjectStreams()
Get the object streams
public
getObjectStreams() : array<string|int, mixed>
Return values
array<string|int, mixed>parse()
Parse the data stream
public
parse([mixed $pages = null ]) : AbstractDocument
Parameters
- $pages : mixed = null
Tags
Return values
AbstractDocumentparseData()
Parse from raw data stream
public
parseData(string $data[, mixed $pages = null ]) : AbstractDocument
Parameters
- $data : string
- $pages : mixed = null
Tags
Return values
AbstractDocumentparseFile()
Parse from file
public
parseFile(string $file[, mixed $pages = null ]) : AbstractDocument
Parameters
- $file : string
- $pages : mixed = null
Tags
Return values
AbstractDocumentinitData()
Initialize data
protected
initData(string $data) : Parser
Parameters
- $data : string
Return values
ParserinitFile()
Initialize the file and get the data
protected
initFile(string $file) : Parser
Parameters
- $file : string
Tags
Return values
ParserkidNumbers()
Extract a rewritten Pages node dict's Kids as a flat list of new object numbers
protected
static kidNumbers(array<string|int, mixed> $topPagesDict) : array<string|int, mixed>
Parameters
- $topPagesDict : array<string|int, mixed>
Return values
array<string|int, mixed>metadataFromDict()
Build a Document\Metadata from a rewritten Info dict
protected
static metadataFromDict(array<string|int, mixed> $infoDict) : Metadata
Parameters
- $infoDict : array<string|int, mixed>