API Documentation

Zend/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 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 24594 2012-01-05 21:27:01Z 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

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

methodprotected_checkParams( ) : void

Check renderer parameters

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

methodpublicrender( ) : mixed

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

Returns
Type Description
mixed
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
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.15.1.