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
- $objectMap : array<string|int, mixed>
- Object map
- $objectStreams : array<string|int, mixed>
- Parsed object data streams
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
- filterPages() : void
- Filter pages
- getObjects() : array<string|int, mixed>
- Get the objects for import
- getStreamType() : string
- Get the object stream type
- initData() : Parser
- Initialize data
- initFile() : Parser
- Initialize the file and get the data
- mapFonts() : void
- Map the fonts, if any
- mapObjects() : void
- Map the objects
Properties
$data
Imported PDF data stream
protected
string|null
$data
= null
$file
Imported PDF file
protected
string|null
$file
= null
$fonts
Document fonts
protected
array<string|int, mixed>
$fonts
= []
$objectMap
Object map
protected
array<string|int, mixed>
$objectMap
= []
$objectStreams
Parsed object data streams
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
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
AbstractDocumentfilterPages()
Filter pages
protected
filterPages(mixed $pages) : void
Parameters
- $pages : mixed
getObjects()
Get the objects for import
protected
getObjects() : array<string|int, mixed>
Return values
array<string|int, mixed>getStreamType()
Get the object stream type
protected
getStreamType(string $stream) : string
Parameters
- $stream : string
Return values
stringinitData()
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
ParsermapFonts()
Map the fonts, if any
protected
mapFonts() : void
mapObjects()
Map the objects
protected
mapObjects() : void