SetaPDF_Core_Document_Page_Contents A class representing a pages content

File: /SetaPDF v2/Core/Document/Page/Contents.php

Class hierarchy

Implements

Summary

Static Properties

$_encapsulatedCache

An array holding encapsulate stream objects which are available to encapsulate an existing content stream "q ... Q". Items are keyed by the document id.


Properties

$_currentOffset

The current content stream offset

$_currentStream

$_encapsulatedInGraphicState

Flag saying if the content is already encapsulated in a graphic state

$_page

The page object to which this helper depends to


Methods

__construct()

_addStream()

protected SetaPDF_Core_Document_Page_Contents::_addStream (
integer|null $beforeIndex [, boolean $setActive = true [, SetaPDF_Core_Type_IndirectObjectInterface $streamObject = null ]]
): SetaPDF_Core_Type_IndirectObjectInterface

Method for adding streams to the Contents entry.

Parameters
$beforeIndex : integer|null
 
$setActive : boolean
 
$streamObject : SetaPDF_Core_Type_IndirectObjectInterface
 

cleanUp()

Release memory/resources.

clear()

Clears the stream object.

count()

public SetaPDF_Core_Document_Page_Contents::count (
void
): integer

Gets the count of contents streams available for this page.

encapsulateExistingContentInGraphicState()

Encapsulate the existing content stream(s) in separate graphic state operators.

Parameters
$force : boolean
 

getLastStreamObject()

public SetaPDF_Core_Document_Page_Contents::getLastStreamObject (
[ boolean $create = false [, boolean $setActive = true ]]
): boolean|SetaPDF_Core_Type_Stream

Get and/or create the last stream.

Parameters
$create : boolean
 
$setActive : boolean
 

getStream()

Get the stream content.

getStreamObject()

Get the stream object.

Parameters
$create : bool
 

getStreamObjectByOffset()

public SetaPDF_Core_Document_Page_Contents::getStreamObjectByOffset (
[ int $offset = 0 [, bool $setActive = true ]]
): boolean|SetaPDF_Core_Type_Stream

Get a stream by offset in the contents array.

Parameters
$offset : int
 
$setActive : bool
 

isLastStreamActive()

Checks if the last content stream is active.

prependStream()

Prepend a stream to the beginning of the Contents array.

Parameters
$setActive : boolean
 
$streamObject : SetaPDF_Core_Type_IndirectObjectInterface
 

pushStream()

Append a stream to the end of the Contents array.

Parameters
$setActive : boolean
 
$streamObject : SetaPDF_Core_Type_IndirectObjectInterface
 

write()

public SetaPDF_Core_Document_Page_Contents::write (
string $bytes
): void

Writes a string to the stream object.

Parameters
$bytes : string