Class for rendering the barcode in PDF resource

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

 Methods

Constructor

__construct(array|\Zend_Config $options = null) : \Zend_Barcode_Renderer_RendererAbstract
Inherited

Parameters

$options

array\Zend_Config

Returns

\Zend_Barcode_Renderer_RendererAbstract

Checking of parameters after all settings

checkParams() : boolean
Inherited

Returns

boolean

Draw the barcode in the rendering resource

draw() : mixed
Inherited

Exceptions

\Zend_Exception
\Zend_Barcode_Exception

Returns

mixed

Retrieve the automatic rendering of exception

getAutomaticRenderError() : boolean
Inherited

Returns

boolean

Retrieve the barcode object

getBarcode() : \Zend_Barcode_Object
Inherited

Returns

\Zend_Barcode_Object

Horizontal position of the barcode in the rendering resource

getHorizontalPosition() : string
Inherited

Returns

string

Retrieve vertical adjustment

getLeftOffset() : integer
Inherited

Returns

integer

Set the size of a module

getModuleSize() : float
Inherited

Returns

float

Retrieve renderer namespace

getRendererNamespace() : string
Inherited

Returns

string

Retrieve vertical adjustment

getTopOffset() : integer
Inherited

Returns

integer

Retrieve renderer type

getType() : string
Inherited

Returns

string

Vertical position of the barcode in the rendering resource

getVerticalPosition() : string
Inherited

Returns

string

Draw the barcode in the PDF, send headers and the PDF

render() : mixed
inherited_from \Zend_Barcode_Renderer_RendererAbstract::render()

Returns

mixed

Render the resource by sending headers and drawed resource

render() : mixed
Inherited

Returns

mixed

Activate/Deactivate the automatic rendering of exception

setAutomaticRenderError(boolean $value) : \Zend_Barcode_Renderer_Pdf
Inherited
fluent This method is part of a fluent interface and will return the same instance

Parameters

$value

boolean

Returns

\Zend_Barcode_Renderer_Pdf

Set the barcode object

setBarcode(\Zend_Barcode_Object $barcode) : \Zend_Barcode_Renderer
Inherited

Parameters

$barcode

\Zend_Barcode_Object

Exceptions

\Zend_Barcode_Renderer_Exception

Returns

\Zend_Barcode_Renderer

Set renderer state from config object

setConfig(\Zend_Config $config) : \Zend_Renderer_Object
Inherited

Parameters

$config

\Zend_Config

Returns

\Zend_Renderer_Object

Horizontal position of the barcode in the rendering resource

setHorizontalPosition(string $value) : \Zend_Barcode_Renderer
Inherited

Parameters

$value

string

Exceptions

\Zend_Barcode_Renderer_Exception

Returns

\Zend_Barcode_Renderer

Manually adjust left position

setLeftOffset(integer $value) : \Zend_Barcode_Renderer
Inherited

Parameters

$value

integer

Exceptions

\Zend_Barcode_Renderer_Exception

Returns

\Zend_Barcode_Renderer

Set the size of a module

setModuleSize(float $value) : \Zend_Barcode_Renderer
Inherited

Parameters

$value

float

Exceptions

\Zend_Barcode_Renderer_Exception

Returns

\Zend_Barcode_Renderer

Set renderer state from options array

setOptions(array $options) : \Zend_Renderer_Object
Inherited

Parameters

$options

array

Returns

\Zend_Renderer_Object

Set renderer namespace for autoloading

setRendererNamespace(string $namespace) : \Zend_Renderer_Object
Inherited

Parameters

$namespace

string

Returns

\Zend_Renderer_Object

Set an image resource to draw the barcode inside

setResource(\Zend_Pdf $pdf, integer $page = 0) : \Zend_Barcode_Renderer

Parameters

$pdf

\Zend_Pdf

$page

integer

Exceptions

\Zend_Barcode_Renderer_Exception

Returns

\Zend_Barcode_Renderer

Manually adjust top position

setTopOffset(integer $value) : \Zend_Barcode_Renderer
Inherited

Parameters

$value

integer

Exceptions

\Zend_Barcode_Renderer_Exception

Returns

\Zend_Barcode_Renderer

Vertical position of the barcode in the rendering resource

setVerticalPosition(string $value) : \Zend_Barcode_Renderer_Pdf
Inherited
fluent This method is part of a fluent interface and will return the same instance

Parameters

$value

string

Exceptions

\Zend_Barcode_Renderer_Exception

Returns

\Zend_Barcode_Renderer_Pdf

Calculate the width of a string: in case of using alignment parameter in drawText

widthForStringUsingFontSize(string $text, \Zend_Pdf_Font $font, float $fontSize) : float

Parameters

$text

string

$font

\Zend_Pdf_Font

$fontSize

float

Returns

float

Calculate the left and top offset of the barcode in the rendering support

_adjustPosition(float $supportHeight, float $supportWidth) : void
Inherited

Parameters

$supportHeight

float

$supportWidth

float

Check if a barcode object is correctly provided

_checkBarcodeObject() : void
Inherited

Exceptions

\Zend_Barcode_Renderer_Exception

Check renderer parameters

_checkParams() : void
inherited_from \Zend_Barcode_Renderer_RendererAbstract::_checkParams()

Checking of parameters after all settings

_checkParams() : void
Inherited

Draw a polygon in the rendering resource

_drawPolygon(array $points, integer $color, boolean $filled = true
inherited_from \Zend_Barcode_Renderer_RendererAbstract::_drawPolygon()

Parameters

$points

array

$color

integer

$filled

boolean

Draw a polygon in the rendering resource

_drawPolygon(array $points, integer $color, boolean $filled = true
Inherited

Parameters

$points

array

$color

integer

$filled

boolean

Draw a text in the rendering resource

_drawText(string $text, float $size, array $position, string $font, integer $color, string $alignment = 'center', float|integer $orientation = 0
inherited_from \Zend_Barcode_Renderer_RendererAbstract::_drawText()

Parameters

$text

string

$size

float

$position

array

$font

string

$color

integer

$alignment

string

$orientation

floatinteger

Draw a polygon in the rendering resource

_drawText(string $text, float $size, array $position, string $font, integer $color, string $alignment = 'center', float|integer $orientation = 0
Inherited

Parameters

$text

string

$size

float

$position

array

$font

string

$color

integer

$alignment

string

$orientation

floatinteger

Initialize the PDF resource

_initRenderer() : void
inherited_from \Zend_Barcode_Renderer_RendererAbstract::_initRenderer()

Initialize the rendering resource

_initRenderer() : void
Inherited

Sub process to draw the barcode instructions Needed by the automatic error rendering

_drawInstructionList() 
Inherited

 Properties

 

Activate/Deactivate the automatic rendering of exception

$_automaticRenderError : boolean

Default

false
 

Barcode object

$_barcode : \Zend_Barcode_Object_ObjectAbstract

Default

 

Horizontal position of the barcode in the rendering resource

$_horizontalPosition : integer

Default

'left'
 

Offset of the barcode from the left of the rendering resource

$_leftOffset : integer

Default

0
 

Module size rendering

$_moduleSize : float

Default

0.5
inherited_from \Zend_Barcode_Renderer_RendererAbstract::_moduleSize
 

Module size rendering

$_moduleSize : float

Default

1
 

Page number in PDF resource

$_page : integer

Default

0
 

Namespace of the renderer for autoloading

$_rendererNamespace : string

Default

'Zend_Barcode_Renderer'
 

PDF resource

$_resource : \Zend_Pdf

Default

null
inherited_from \Zend_Barcode_Renderer_RendererAbstract::_resource
 

Drawing resource

$_resource 

Default

 

Offset of the barcode from the top of the rendering resource

$_topOffset : integer

Default

0
 

Renderer type

$_type : string

Default

null
 

Vertical position of the barcode in the rendering resource

$_verticalPosition : integer

Default

'top'