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