Content stream (drawing instructions container)

package Zend_Pdf
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License
inherited_from \Zend_Pdf_Resource

 Methods

Clone page, extract it and dependent objects from the current document, so it can be used within other docs.

__clone() 
Inherited

Object constructor.

__construct(\Zend_Pdf_Element_Object_Stream|string $contentStreamObject = ''

If resource is not a Zend_Pdf_Element object, then stream object with specified value is generated.

inherited_from \Zend_Pdf_Resource::__construct()

Parameters

$contentStreamObject

\Zend_Pdf_Element_Object_Streamstring

Exceptions

\Zend_Pdf_Exception

Object constructor.

__construct(\Zend_Pdf_Element|string $resource) 
Inherited

If resource is not a Zend_Pdf_Element object, then stream object with specified value is generated.

Parameters

$resource

\Zend_Pdf_Elementstring

Appends instructions to the end of the content stream

addInstructions(string $instructions) : \Zend_Pdf_Resource_ContentStream

Parameters

$instructions

string

Returns

\Zend_Pdf_Resource_ContentStream

Clear stream content.

clear() : \Zend_Pdf_Resource_ContentStream

Returns

\Zend_Pdf_Resource_ContentStream

Flush buffered content

flush() 

Get current stream content

getInstructions() : string

Returns

string

 Properties

 

Buffered content

$_bufferedContent : string

Default

''
 

Each Pdf resource (fonts, images, .

$_objectFactory : \Zend_Pdf_ElementFactory_Interface

Default

..) interacts with a PDF itself. It creates appropriate PDF objects, structures and sometime embedded files. Resources are referenced in content streams by names, which are stored in a page resource dictionaries.

Thus, resources must be attached to the PDF.

Resource abstraction uses own PDF object factory to store all necessary information. At the render time internal object factory is appended to the global PDF file factory.

Resource abstraction also cashes information about rendered PDF files and doesn't duplicate resource description each time then Resource is rendered (referenced).

 

Main resource object

$_resource : \Zend_Pdf_Element_Object

Default