StreamObject
extends AbstractObject
in package
Pdf stream object class
Tags
Table of Contents
- $data : string
- PDF object data
- $definition : string
- PDF stream object definition
- $encoding : bool
- Encoding filter
- $index : int
- PDF stream object index
- $isImported : string
- Imported flag
- $isPalette : bool
- Palette object flag
- $isXObject : bool
- XObject object flag
- $stream : string
- PDF stream object stream
- __construct() : mixed
- Constructor
- __toString() : string
- Method to print the PDF stream object.
- appendStream() : StreamObject
- Append to the stream the PDF stream object
- decode() : bool|string
- Method to decode the PDF stream contents with FlateDecode (gzuncompress)
- encode() : void
- Method to encode the PDF stream object with FlateDecode (gzcompress)
- getByteLength() : int
- Get the PDF stream object byte length
- getData() : string
- Get the object stream
- getDefinition() : string
- Get the stream object definition
- getDictionaryReferences() : array<string|int, mixed>
- Get the integer references within a dictionary stream
- getEncoding() : string
- Get the encoding filter
- getIndex() : int
- Get the object index
- getStream() : string
- Get the PDF stream object stream
- isEncoded() : bool
- Determine whether or not the PDF stream object is encoded
- isImported() : bool
- Determine if the object is imported
- isPalette() : bool
- Get whether the PDF stream object is a palette object
- isXObject() : bool
- Get whether the PDF stream object is an XObject
- parse() : StreamObject
- Parse a stream object from a string
- setData() : AbstractObject
- Set the object data
- setDefinition() : StreamObject
- Set the stream object definition
- setImported() : AbstractObject
- Set whether the object is imported
- setIndex() : AbstractObject
- Set the object index
- setPalette() : void
- Set whether the PDF stream object is a palette object
- setStream() : StreamObject
- Set the stream object stream
- calculateByteLength() : int
- Calculate the byte length of a string
Properties
$data
PDF object data
protected
string
$data
= null
$definition
PDF stream object definition
protected
string
$definition
= null
$encoding
Encoding filter
protected
bool
$encoding
= null
$index
PDF stream object index
protected
int
$index
= 5
$isImported
Imported flag
protected
string
$isImported
= false
$isPalette
Palette object flag
protected
bool
$isPalette
= false
$isXObject
XObject object flag
protected
bool
$isXObject
= false
$stream
PDF stream object stream
protected
string
$stream
= null
Methods
__construct()
Constructor
public
__construct([int $index = 5 ]) : mixed
Instantiate a PDF stream object.
Parameters
- $index : int = 5
Return values
mixed —__toString()
Method to print the PDF stream object.
public
__toString() : string
Return values
string —appendStream()
Append to the stream the PDF stream object
public
appendStream(string $stream) : StreamObject
Parameters
- $stream : string
Return values
StreamObject —decode()
Method to decode the PDF stream contents with FlateDecode (gzuncompress)
public
decode() : bool|string
Return values
bool|string —encode()
Method to encode the PDF stream object with FlateDecode (gzcompress)
public
encode() : void
Return values
void —getByteLength()
Get the PDF stream object byte length
public
getByteLength() : int
Return values
int —getData()
Get the object stream
public
getData() : string
Return values
string —getDefinition()
Get the stream object definition
public
getDefinition() : string
Return values
string —getDictionaryReferences()
Get the integer references within a dictionary stream
public
getDictionaryReferences(string $dictionary) : array<string|int, mixed>
Parameters
- $dictionary : string
Return values
array<string|int, mixed> —getEncoding()
Get the encoding filter
public
getEncoding() : string
Return values
string —getIndex()
Get the object index
public
getIndex() : int
Return values
int —getStream()
Get the PDF stream object stream
public
getStream() : string
Return values
string —isEncoded()
Determine whether or not the PDF stream object is encoded
public
isEncoded() : bool
Return values
bool —isImported()
Determine if the object is imported
public
isImported() : bool
Return values
bool —isPalette()
Get whether the PDF stream object is a palette object
public
isPalette() : bool
Return values
bool —isXObject()
Get whether the PDF stream object is an XObject
public
isXObject() : bool
Return values
bool —parse()
Parse a stream object from a string
public
static parse(string $stream) : StreamObject
Parameters
- $stream : string
Return values
StreamObject —setData()
Set the object data
public
setData(string $data) : AbstractObject
Parameters
- $data : string
Return values
AbstractObject —setDefinition()
Set the stream object definition
public
setDefinition(string $definition) : StreamObject
Parameters
- $definition : string
Return values
StreamObject —setImported()
Set whether the object is imported
public
setImported(bool $imported) : AbstractObject
Parameters
- $imported : bool
Return values
AbstractObject —setIndex()
Set the object index
public
setIndex(int $i) : AbstractObject
Parameters
- $i : int
Return values
AbstractObject —setPalette()
Set whether the PDF stream object is a palette object
public
setPalette(bool $isPalette) : void
Parameters
- $isPalette : bool
Return values
void —setStream()
Set the stream object stream
public
setStream(string $stream) : StreamObject
Parameters
- $stream : string
Return values
StreamObject —calculateByteLength()
Calculate the byte length of a string
protected
calculateByteLength(string $string) : int
Parameters
- $string : string