Barcode/Renderer/Pdf.php

Show: inherited
Table of Contents

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 [email protected] so we can send you a copy immediately.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Barcode  
Subpackage
Renderer  
Version
$Id: Pdf.php 24593 2012-01-05 20:35:02Z matthew $  

\Zend_Barcode_Renderer_Pdf

Package: Zend\Barcode

Class for rendering the barcode in PDF resource

Parent(s)
\Zend_Barcode_Renderer_RendererAbstract
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

Propertyprotectedboolean $_automaticRenderError = false
inherited

Activate/Deactivate the automatic rendering of exception

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::$$_automaticRenderError
Default valuefalseDetails
Type
boolean
Inherited_from
\Zend_Barcode_Renderer_RendererAbstract::$$_automaticRenderError  
Propertyprotected\Zend_Barcode_Object_ObjectAbstract $_barcode =
inherited

Barcode object

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::$$_barcode
Propertyprotectedinteger $_horizontalPosition = 'left'
inherited

Horizontal position of the barcode in the rendering resource

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::$$_horizontalPosition
Default value'left'Details
Type
integer
Inherited_from
\Zend_Barcode_Renderer_RendererAbstract::$$_horizontalPosition  
Propertyprotectedinteger $_leftOffset = 0
inherited

Offset of the barcode from the left of the rendering resource

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::$$_leftOffset
Default value0Details
Type
integer
Inherited_from
\Zend_Barcode_Renderer_RendererAbstract::$$_leftOffset  
Propertyprotectedfloat $_moduleSize = 0.5

Module size rendering

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

Page number in PDF resource

Default value0Details
Type
integer
Propertyprotectedstring $_rendererNamespace = 'Zend_Barcode_Renderer'
inherited

Namespace of the renderer for autoloading

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::$$_rendererNamespace
Default value'Zend_Barcode_Renderer'Details
Type
string
Inherited_from
\Zend_Barcode_Renderer_RendererAbstract::$$_rendererNamespace  
Propertyprotected\Zend_Pdf $_resource = null

PDF resource

Default valuenullDetails
Type
\Zend_Pdf
Propertyprotectedinteger $_topOffset = 0
inherited

Offset of the barcode from the top of the rendering resource

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::$$_topOffset
Default value0Details
Type
integer
Inherited_from
\Zend_Barcode_Renderer_RendererAbstract::$$_topOffset  
Propertyprotectedstring $_type = null
inherited

Renderer type

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::$$_type
Default valuenullDetails
Type
string
Inherited_from
\Zend_Barcode_Renderer_RendererAbstract::$$_type  
Propertyprotectedinteger $_verticalPosition = 'top'
inherited

Vertical position of the barcode in the rendering resource

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::$$_verticalPosition
Default value'top'Details
Type
integer
Inherited_from
\Zend_Barcode_Renderer_RendererAbstract::$$_verticalPosition  

Methods

methodpublic__construct(array | \Zend_Config $options = null) : void
inherited

Constructor

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::__construct()
Parameters
Name Type Description
$options array | \Zend_Config
methodprotected_adjustPosition(float $supportHeight, float $supportWidth) : void
inherited

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
inherited

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
inherited

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
inherited

Checking of parameters after all settings

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

Draw the barcode in the rendering resource

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

Retrieve the automatic rendering of exception

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

Retrieve the barcode object

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

Horizontal position of the barcode in the rendering resource

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

Retrieve vertical adjustment

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

Set the size of a module

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

Retrieve renderer namespace

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

Retrieve vertical adjustment

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

Retrieve renderer type

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

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

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 phpDocumentor 2.0.0a8.