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-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Barcode  
Subpackage
Renderer  
Version
$Id$  

\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-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

>VPropertyprotectedfloat $_moduleSize = 0.5
Module size rendering
Default value0.5Details
Type
float
>VPropertyprotectedinteger $_page = 0
Page number in PDF resource
Default value0Details
Type
integer
>VPropertyprotected\Zend_Pdf $_resource = null
PDF resource
Default valuenullDetails
Type
\Zend_Pdf

Methods

methodprotected_checkParams() : void

Check renderer parameters

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

methodpublicrender() : mixed

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

Returns
TypeDescription
mixed
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
 
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.2.0 .