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.
Class for rendering the barcode in PDF resource

_drawPolygon(
array $points, integer $color, boolean $filled
=
true
)
:
void
Draw a polygon in the rendering resource
Name | Type | Description |
---|---|---|
$points | array | |
$color | integer | |
$filled | boolean |

_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
Name | Type | Description |
---|---|---|
$text | string | |
$size | float | |
$position | array | |
$font | string | |
$color | integer | |
$alignment | string | |
$orientation | float |

render(
)
:
mixed
Draw the barcode in the PDF, send headers and the PDF
Type | Description |
---|---|
mixed |

setResource(
$pdf, $page
=
0
)
:
\Zend_Barcode_Renderer
Set an image resource to draw the barcode inside
Name | Type | Description |
---|---|---|
$page |
Type | Description |
---|---|
\Zend_Barcode_Renderer |
Exception | Description |
---|---|
\Zend_Barcode_Renderer_Exception |

widthForStringUsingFontSize(
string $text, \Zend_Pdf_Font $font, float $fontSize
)
:
float
Calculate the width of a string: in case of using alignment parameter in drawText
Name | Type | Description |
---|---|---|
$text | string | |
$font | \Zend_Pdf_Font | |
$fontSize | float |
Type | Description |
---|---|
float |