API Documentation

Barcode/Renderer/Pdf.php

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

category
Zend  
copyright
Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)  
license
New BSD License  
package
Zend_Barcode  
subpackage
Renderer  
version
$Id: Pdf.php 23775 2011-03-01 17:25:24Z ralph $  

\Zend_Barcode_Renderer_Pdf

Class for rendering the barcode in PDF resource

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

Properties

Propertyprotectedfloat  $_moduleSize= '0.5'

Module size rendering

Default value0.5Details
Type
float
Propertyprotectedinteger  $_page= '0'

Page number in PDF resource

Default value0Details
Type
integer
Propertyprotected\Zend_Pdf  $_resource= 'null'

PDF resource

Default valuenullDetails
Type
\Zend_Pdf

Methods

methodpublic__construct( array|\Zend_Config $options = null ) : void
Parameters
Name Type Description
$options array|\Zend_Config
methodprotected_adjustPosition( float $supportHeight, float $supportWidth ) : void

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

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::_adjustPosition()
Parameters
Name Type Description
$supportHeight float
$supportWidth float
methodprotected_checkBarcodeObject( ) : void

Check if a barcode object is correctly provided

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::_checkBarcodeObject()
Throws
Exception Description
\Zend_Barcode_Renderer_Exception
methodprotected_checkParams( ) : void

Check renderer parameters

methodprivate_drawInstructionList( ) : void

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

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::_drawInstructionList()
methodprotected_drawPolygon( array $points, integer $color, boolean $filled = true ) : void

Draw a polygon in the rendering resource

Parameters
Name Type Description
$points array
$color integer
$filled boolean
methodprotected_drawText( string $text, float $size, array $position, string $font, integer $color, string $alignment = center, float $orientation = 0 ) : void

Draw a text in the rendering resource

Parameters
Name Type Description
$text string
$size float
$position array
$font string
$color integer
$alignment string
$orientation float
methodprotected_initRenderer( ) : void

Initialize the PDF resource

methodpubliccheckParams( ) : boolean

Checking of parameters after all settings

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::checkParams()
Returns
Type Description
boolean
methodpublicdraw( ) : mixed

Draw the barcode in the rendering resource

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::draw()
Returns
Type Description
mixed
methodpublicgetAutomaticRenderError( ) : boolean

Retrieve the automatic rendering of exception

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::getAutomaticRenderError()
Returns
Type Description
boolean
methodpublicgetBarcode( ) : \Zend_Barcode_Object

Retrieve the barcode object

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::getBarcode()
Returns
Type Description
\Zend_Barcode_Object
methodpublicgetHorizontalPosition( ) : string

Horizontal position of the barcode in the rendering resource

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::getHorizontalPosition()
Returns
Type Description
string
methodpublicgetLeftOffset( ) : integer

Retrieve vertical adjustment

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::getLeftOffset()
Returns
Type Description
integer
methodpublicgetModuleSize( ) : float

Set the size of a module

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::getModuleSize()
Returns
Type Description
float
methodpublicgetRendererNamespace( ) : string

Retrieve renderer namespace

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::getRendererNamespace()
Returns
Type Description
string
methodpublicgetTopOffset( ) : integer

Retrieve vertical adjustment

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::getTopOffset()
Returns
Type Description
integer
methodpublicgetType( ) : string

Retrieve renderer type

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::getType()
Returns
Type Description
string
methodpublicgetVerticalPosition( ) : string

Vertical position of the barcode in the rendering resource

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::getVerticalPosition()
Returns
Type Description
string
methodpublicrender( ) : mixed

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

Returns
Type Description
mixed
methodpublicsetAutomaticRenderError( boolean $value ) : void

Activate/Deactivate the automatic rendering of exception

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::setAutomaticRenderError()
Parameters
Name Type Description
$value boolean
methodpublicsetBarcode( \Zend_Barcode_Object $barcode ) : \Zend_Barcode_Renderer

Set the barcode object

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::setBarcode()
Parameters
Name Type Description
$barcode \Zend_Barcode_Object
Returns
Type Description
\Zend_Barcode_Renderer
methodpublicsetConfig( \Zend_Config $config ) : \Zend_Renderer_Object

Set renderer state from config object

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::setConfig()
Parameters
Name Type Description
$config \Zend_Config
Returns
Type Description
\Zend_Renderer_Object
methodpublicsetHorizontalPosition( string $value ) : \Zend_Barcode_Renderer

Horizontal position of the barcode in the rendering resource

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::setHorizontalPosition()
Parameters
Name Type Description
$value string
Returns
Type Description
\Zend_Barcode_Renderer
Throws
Exception Description
\Zend_Barcode_Renderer_Exception
methodpublicsetLeftOffset( integer $value ) : \Zend_Barcode_Renderer

Manually adjust left position

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::setLeftOffset()
Parameters
Name Type Description
$value integer
Returns
Type Description
\Zend_Barcode_Renderer
Throws
Exception Description
\Zend_Barcode_Renderer_Exception
methodpublicsetModuleSize( float $value ) : \Zend_Barcode_Renderer

Set the size of a module

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::setModuleSize()
Parameters
Name Type Description
$value float
Returns
Type Description
\Zend_Barcode_Renderer
Throws
Exception Description
\Zend_Barcode_Renderer_Exception
methodpublicsetOptions( array $options ) : \Zend_Renderer_Object

Set renderer state from options array

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::setOptions()
Parameters
Name Type Description
$options array
Returns
Type Description
\Zend_Renderer_Object
methodpublicsetRendererNamespace( string $namespace ) : \Zend_Renderer_Object

Set renderer namespace for autoloading

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::setRendererNamespace()
Parameters
Name Type Description
$namespace string
Returns
Type Description
\Zend_Renderer_Object
methodpublicsetResource(  $pdf,  $page = 0 ) : \Zend_Barcode_Renderer

Set an image resource to draw the barcode inside

Parameters
Name Type Description
$pdf
$page
Returns
Type Description
\Zend_Barcode_Renderer
Throws
Exception Description
\Zend_Barcode_Renderer_Exception
methodpublicsetTopOffset( integer $value ) : \Zend_Barcode_Renderer

Manually adjust top position

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::setTopOffset()
Parameters
Name Type Description
$value integer
Returns
Type Description
\Zend_Barcode_Renderer
Throws
Exception Description
\Zend_Barcode_Renderer_Exception
methodpublicsetVerticalPosition( string $value ) : \Zend_Barcode_Renderer

Vertical position of the barcode in the rendering resource

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::setVerticalPosition()
Parameters
Name Type Description
$value string
Returns
Type Description
\Zend_Barcode_Renderer
Throws
Exception Description
\Zend_Barcode_Renderer_Exception
methodpublicwidthForStringUsingFontSize( string $text, \Zend_Pdf_Font $font, float $fontSize ) : float

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

Parameters
Name Type Description
$text string
$font \Zend_Pdf_Font
$fontSize float
Returns
Type Description
float
Documentation was generated by DocBlox 0.13.3.