setasign\SetaPDF2\Core\Document\Page
Contents A class representing a pages content
File: /SetaPDF v2/Core/Document/Page/Contents.php
Old class name (alias):
\SetaPDF_Core_Document_Page_Contents
Class hierarchy
Implements
- \Countable
- \setasign\SetaPDF2\Core\Canvas\StreamProxyInterface
- \setasign\SetaPDF2\Core\Writer\WriteInterface
Summary
Properties
$_currentOffset
protected int Contents::$_currentOffset
The current content stream offset
$_currentStream
protected \SetaPDF_Core_Type_Stream Contents::$_currentStream
The current active content stream
$_page
protected \SetaPDF_Core_Document_Page Contents::$_page
The page object to which this helper instance depends on
Methods
__construct()
_addStream()
protected Contents::_addStream (
?int $beforeIndex,
bool $setActive = true,
?\SetaPDF_Core_Type_IndirectObjectInterface $streamObject = null
): \SetaPDF_Core_Type_IndirectObjectInterfacebool $setActive = true,
?\SetaPDF_Core_Type_IndirectObjectInterface $streamObject = null
Method for adding streams to the Contents entry.
Parameters
- $beforeIndex : ?int
- $setActive : bool
- $streamObject : ?\SetaPDF_Core_Type_IndirectObjectInterface
Exceptions
encapsulateExistingContentInGraphicState()
Encapsulate the existing content stream(s) in separate graphic state operators.
Parameters
- $force : bool
Exceptions
getLastStreamObject()
public Contents::getLastStreamObject (
bool $create = false,
bool $setActive = true
): bool|\SetaPDF_Core_Type_Streambool $setActive = true
Get and/or create the last stream.
Parameters
- $create : bool
- $setActive : bool
Exceptions
getStreamObjectByOffset()
public Contents::getStreamObjectByOffset (
int $offset = 0,
bool $setActive = true
): bool|\SetaPDF_Core_Type_Streambool $setActive = true
Get a stream by offset in the contents array.
Parameters
- $offset : int
- $setActive : bool
prependStream()
Prepend a stream to the beginning of the Contents array.
Parameters
- $setActive : bool
- $streamObject : ?\SetaPDF_Core_Type_IndirectObjectInterface
Exceptions
pushStream()
Append a stream to the end of the Contents array.
Parameters
- $setActive : bool
- $streamObject : ?\SetaPDF_Core_Type_IndirectObjectInterface