Barcode/Renderer/Pdf.php

Show: PublicProtectedPrivateinherited
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 license@zend.com 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

>VPropertyprotectedboolean $_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  
>VPropertyprotected\Zend_Barcode_Object_ObjectAbstract $_barcode
inherited
Barcode object
Inherited from: \Zend_Barcode_Renderer_RendererAbstract::$$_barcode
>VPropertyprotectedinteger $_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  
>VPropertyprotectedinteger $_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  
>VPropertyprotectedfloat $_moduleSize = 0.5
Module size rendering
Default value0.5Details
Type
float
>VPropertyprotectedinteger $_page = 0
Page number in PDF resource
Default value0Details
Type
integer
>VPropertyprotectedstring $_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  
>VPropertyprotected\Zend_Pdf $_resource = null
PDF resource
Default valuenullDetails
Type
\Zend_Pdf
>VPropertyprotectedinteger $_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  
>VPropertyprotectedstring $_type = null
inherited
Renderer type
Inherited from: \Zend_Barcode_Renderer_RendererAbstract::$$_type
Default valuenullDetails
Type
string
Inherited_from
\Zend_Barcode_Renderer_RendererAbstract::$$_type  
>VPropertyprotectedinteger $_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
NameTypeDescription
$optionsarray | \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
NameTypeDescription
$supportHeightfloat
$supportWidthfloat
methodprotected_checkBarcodeObject() : void
inherited

Check if a barcode object is correctly provided

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::_checkBarcodeObject()
Details
Throw
 
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
NameTypeDescription
$pointsarray
$colorinteger
$filledboolean
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
NameTypeDescription
$textstring
$sizefloat
$positionarray
$fontstring
$colorinteger
$alignmentstring
$orientationfloat
methodprotected_initRenderer() : void

Initialize the PDF resource

methodpubliccheckParams() : boolean
inherited

Checking of parameters after all settings

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

Draw the barcode in the rendering resource

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

Retrieve the automatic rendering of exception

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

Retrieve the barcode object

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

Horizontal position of the barcode in the rendering resource

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

Retrieve vertical adjustment

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

Set the size of a module

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

Retrieve renderer namespace

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

Retrieve vertical adjustment

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

Retrieve renderer type

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

Vertical position of the barcode in the rendering resource

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

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

Returns
TypeDescription
mixed
methodpublicsetAutomaticRenderError(boolean $value) : void
inherited

Activate/Deactivate the automatic rendering of exception

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::setAutomaticRenderError()
Parameters
NameTypeDescription
$valueboolean
methodpublicsetBarcode(\Zend_Barcode_Object $barcode) : \Zend_Barcode_Renderer
inherited

Set the barcode object

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::setBarcode()
Parameters
NameTypeDescription
$barcode\Zend_Barcode_Object
Returns
TypeDescription
\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
NameTypeDescription
$config\Zend_Config
Returns
TypeDescription
\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
NameTypeDescription
$valuestring
Returns
TypeDescription
\Zend_Barcode_Renderer
Details
Throw
 
methodpublicsetLeftOffset(integer $value) : \Zend_Barcode_Renderer
inherited

Manually adjust left position

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::setLeftOffset()
Parameters
NameTypeDescription
$valueinteger
Returns
TypeDescription
\Zend_Barcode_Renderer
Details
Throw
 
methodpublicsetModuleSize(float $value) : \Zend_Barcode_Renderer
inherited

Set the size of a module

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::setModuleSize()
Parameters
NameTypeDescription
$valuefloat
Returns
TypeDescription
\Zend_Barcode_Renderer
Details
Throw
 
methodpublicsetOptions(array $options) : \Zend_Renderer_Object
inherited

Set renderer state from options array

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::setOptions()
Parameters
NameTypeDescription
$optionsarray
Returns
TypeDescription
\Zend_Renderer_Object
methodpublicsetRendererNamespace(string $namespace) : \Zend_Renderer_Object
inherited

Set renderer namespace for autoloading

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::setRendererNamespace()
Parameters
NameTypeDescription
$namespacestring
Returns
TypeDescription
\Zend_Renderer_Object
methodpublicsetResource( $pdf,  $page = 0) : \Zend_Barcode_Renderer

Set an image resource to draw the barcode inside

Parameters
NameTypeDescription
$pdf
$page
Returns
TypeDescription
\Zend_Barcode_Renderer
Details
Throw
 
methodpublicsetTopOffset(integer $value) : \Zend_Barcode_Renderer
inherited

Manually adjust top position

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::setTopOffset()
Parameters
NameTypeDescription
$valueinteger
Returns
TypeDescription
\Zend_Barcode_Renderer
Details
Throw
 
methodpublicsetVerticalPosition(string $value) : \Zend_Barcode_Renderer
inherited

Vertical position of the barcode in the rendering resource

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::setVerticalPosition()
Parameters
NameTypeDescription
$valuestring
Returns
TypeDescription
\Zend_Barcode_Renderer
Details
Throw
 
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
NameTypeDescription
$textstring
$font\Zend_Pdf_Font
$fontSizefloat
Returns
TypeDescription
float
Documentation was generated by phpDocumentor 2.0.0a12.