SetaPDF_Core_Document_Page_Contents A class representing a pages content
File: /SetaPDF v2/Core/Document/Page/Contents.php
Class hierarchy
Implements
Summary
Properties
$_currentOffset
protected int SetaPDF_Core_Document_Page_Contents::$_currentOffset
The current content stream offset
Methods
__construct()
_addStream()
protected SetaPDF_Core_Document_Page_Contents::_addStream (
int|null $beforeIndex [, bool $setActive = true [, SetaPDF_Core_Type_IndirectObjectInterface $streamObject = null ]]
): SetaPDF_Core_Type_IndirectObjectInterfaceMethod for adding streams to the Contents entry.
Parameters
- $beforeIndex : int|null
- $setActive : bool
- $streamObject : SetaPDF_Core_Type_IndirectObjectInterface
Exceptions
Throws SetaPDF_Core_Type_Exception
encapsulateExistingContentInGraphicState()
public SetaPDF_Core_Document_Page_Contents::encapsulateExistingContentInGraphicState (
[ bool $force = false ]
): voidEncapsulate the existing content stream(s) in separate graphic state operators.
Parameters
- $force : bool
Exceptions
Throws SetaPDF_Core_Type_Exception
getLastStreamObject()
public SetaPDF_Core_Document_Page_Contents::getLastStreamObject (
[ bool $create = false [, bool $setActive = true ]]
): bool|SetaPDF_Core_Type_StreamGet and/or create the last stream.
Parameters
- $create : bool
- $setActive : bool
Exceptions
Throws SetaPDF_Core_Type_Exception
getStream()
public SetaPDF_Core_Document_Page_Contents::getStream (
[ bool $ignoreFaultyStreams = false ]
): stringGet the stream content.
Parameters
- $ignoreFaultyStreams : bool
getStreamObject()
public SetaPDF_Core_Document_Page_Contents::getStreamObject (
[ bool $create = false ]
): bool|SetaPDF_Core_Type_StreamGet the stream object.
Parameters
- $create : bool
Exceptions
Throws SetaPDF_Core_Type_Exception
getStreamObjectByOffset()
public SetaPDF_Core_Document_Page_Contents::getStreamObjectByOffset (
[ int $offset = 0 [, bool $setActive = true ]]
): bool|SetaPDF_Core_Type_StreamGet a stream by offset in the contents array.
Parameters
- $offset : int
- $setActive : bool
prependStream()
public SetaPDF_Core_Document_Page_Contents::prependStream (
[ bool $setActive = true [, SetaPDF_Core_Type_IndirectObjectInterface $streamObject = null ]]
): SetaPDF_Core_Type_IndirectObjectInterfacePrepend a stream to the beginning of the Contents array.
Parameters
- $setActive : bool
- $streamObject : SetaPDF_Core_Type_IndirectObjectInterface
Exceptions
Throws SetaPDF_Core_Type_Exception
pushStream()
public SetaPDF_Core_Document_Page_Contents::pushStream (
[ bool $setActive = true [, SetaPDF_Core_Type_IndirectObjectInterface $streamObject = null ]]
): SetaPDF_Core_Type_IndirectObjectInterfaceAppend a stream to the end of the Contents array.
Parameters
- $setActive : bool
- $streamObject : SetaPDF_Core_Type_IndirectObjectInterface
Exceptions
Throws SetaPDF_Core_Type_Exception
write()
Writes a string to the stream object.
Parameters
- $bytes : string
Exceptions
Throws SetaPDF_Core_Type_Exception