Class for rendering the barcode in PDF resource

package Default
inherited_from \Zend\Barcode\Renderer\AbstractRenderer

 Methods

Constructor

__construct(array|\Traversable $options = null
Inherited
inherited_from \Zend\Barcode\Renderer\RendererInterface::__construct()

Parameters

$options

array\Traversable

Checking of parameters after all settings

checkParams() : boolean
Inherited
inherited_from \Zend\Barcode\Renderer\RendererInterface::checkParams()

Returns

boolean

Draw the barcode in the rendering resource

draw() : mixed
Inherited
inherited_from \Zend\Barcode\Renderer\RendererInterface::draw()

Exceptions

\Zend\Barcode\Exception\ExceptionInterface

Returns

mixed

Retrieve the automatic rendering of exception

getAutomaticRenderError() : boolean
Inherited
inherited_from \Zend\Barcode\Renderer\RendererInterface::getAutomaticRenderError()

Returns

boolean

Retrieve the barcode object

getBarcode() : \Zend\Barcode\Object\ObjectInterface
Inherited
inherited_from \Zend\Barcode\Renderer\RendererInterface::getBarcode()

Returns

\Zend\Barcode\Object\ObjectInterface

Horizontal position of the barcode in the rendering resource

getHorizontalPosition() : string
Inherited
inherited_from \Zend\Barcode\Renderer\RendererInterface::getHorizontalPosition()

Returns

string

Retrieve vertical adjustment

getLeftOffset() : integer
Inherited
inherited_from \Zend\Barcode\Renderer\RendererInterface::getLeftOffset()

Returns

integer

Set the size of a module

getModuleSize() : float
Inherited
inherited_from \Zend\Barcode\Renderer\RendererInterface::getModuleSize()

Returns

float

Retrieve renderer namespace

getRendererNamespace() : string
Inherited
inherited_from \Zend\Barcode\Renderer\RendererInterface::getRendererNamespace()

Returns

string

Retrieve vertical adjustment

getTopOffset() : integer
Inherited
inherited_from \Zend\Barcode\Renderer\RendererInterface::getTopOffset()

Returns

integer

getTransparentBackground()

getTransparentBackground() : boolean
Inherited

Returns

boolean

Retrieve renderer type

getType() : string
Inherited
inherited_from \Zend\Barcode\Renderer\RendererInterface::getType()

Returns

string

Vertical position of the barcode in the rendering resource

getVerticalPosition() : string
Inherited
inherited_from \Zend\Barcode\Renderer\RendererInterface::getVerticalPosition()

Returns

string

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

render() : mixed

Returns

mixed

Activate/Deactivate the automatic rendering of exception

setAutomaticRenderError(boolean $value) : \Zend\Barcode\Renderer\AbstractRenderer
Inherited
inherited_from \Zend\Barcode\Renderer\RendererInterface::setAutomaticRenderError()

Parameters

$value

boolean

Returns

\Zend\Barcode\Renderer\AbstractRenderer

Set the barcode object

setBarcode(\Zend\Barcode\Object\ObjectInterface $barcode) : \Zend\Barcode\Renderer\AbstractRenderer
Inherited
inherited_from \Zend\Barcode\Renderer\RendererInterface::setBarcode()

Parameters

$barcode

\Zend\Barcode\Object\ObjectInterface

Returns

\Zend\Barcode\Renderer\AbstractRenderer

Horizontal position of the barcode in the rendering resource

setHorizontalPosition(string $value) : \Zend\Barcode\Renderer\AbstractRenderer
Inherited
inherited_from \Zend\Barcode\Renderer\RendererInterface::setHorizontalPosition()

Parameters

$value

string

Exceptions

\Zend\Barcode\Renderer\Exception\UnexpectedValueException

Returns

\Zend\Barcode\Renderer\AbstractRenderer

Manually adjust left position

setLeftOffset(integer $value) : \Zend\Barcode\Renderer\AbstractRenderer
Inherited
inherited_from \Zend\Barcode\Renderer\RendererInterface::setLeftOffset()

Parameters

$value

integer

Exceptions

\Zend\Barcode\Renderer\Exception\OutOfRangeException

Returns

\Zend\Barcode\Renderer\AbstractRenderer

Set the size of a module

setModuleSize(float $value) : \Zend\Barcode\Renderer\AbstractRenderer
Inherited
inherited_from \Zend\Barcode\Renderer\RendererInterface::setModuleSize()

Parameters

$value

float

Exceptions

\Zend\Barcode\Renderer\Exception\OutOfRangeException

Returns

\Zend\Barcode\Renderer\AbstractRenderer

Set renderer state from options array

setOptions(array $options) : \Zend\Barcode\Renderer\AbstractRenderer
Inherited
inherited_from \Zend\Barcode\Renderer\RendererInterface::setOptions()

Parameters

$options

array

Returns

\Zend\Barcode\Renderer\AbstractRenderer

Set renderer namespace for autoloading

setRendererNamespace(string $namespace) : \Zend\Barcode\Renderer\AbstractRenderer
Inherited
inherited_from \Zend\Barcode\Renderer\RendererInterface::setRendererNamespace()

Parameters

$namespace

string

Returns

\Zend\Barcode\Renderer\AbstractRenderer

Set a PDF resource to draw the barcode inside

setResource(\ZendPdf\PdfDocument $pdf, integer $page = 0) : \Zend\Barcode\Renderer\Pdf

Parameters

$pdf

\ZendPdf\PdfDocument

$page

integer

Returns

\Zend\Barcode\Renderer\Pdf

Manually adjust top position

setTopOffset(integer $value) : \Zend\Barcode\Renderer\AbstractRenderer
Inherited
inherited_from \Zend\Barcode\Renderer\RendererInterface::setTopOffset()

Parameters

$value

integer

Exceptions

\Zend\Barcode\Renderer\Exception\OutOfRangeException

Returns

\Zend\Barcode\Renderer\AbstractRenderer

Set whether background should be transparent Will work for SVG and Image (png and gif only)

setTransparentBackground($bool) : \Zend\Barcode\Renderer\Pdf
Inherited
fluent This method is part of a fluent interface and will return the same instance

Parameters

$bool

Returns

\Zend\Barcode\Renderer\Pdf

Vertical position of the barcode in the rendering resource

setVerticalPosition(string $value) : \Zend\Barcode\Renderer\AbstractRenderer
Inherited
inherited_from \Zend\Barcode\Renderer\RendererInterface::setVerticalPosition()

Parameters

$value

string

Exceptions

\Zend\Barcode\Renderer\Exception\UnexpectedValueException

Returns

\Zend\Barcode\Renderer\AbstractRenderer

Calculate the width of a string: in case of using alignment parameter in drawText

widthForStringUsingFontSize(string $text, \ZendPdf\Font $font, float $fontSize) : float

Parameters

$text

string

$font

\ZendPdf\Font

$fontSize

float

Returns

float

Calculate the left and top offset of the barcode in the rendering support

adjustPosition(float $supportHeight, float $supportWidth) : void
Inherited

Parameters

$supportHeight

float

$supportWidth

float

Check if a barcode object is correctly provided

checkBarcodeObject() : void
Inherited

Exceptions

\Zend\Barcode\Renderer\Exception\RuntimeException

Check renderer parameters

checkSpecificParams() : void
inherited_from \Zend\Barcode\Renderer\AbstractRenderer::checkSpecificParams()

Checking of parameters after all settings

checkSpecificParams() : void
Inherited

Draw a polygon in the rendering resource

drawPolygon(array $points, integer $color, boolean $filled = true
inherited_from \Zend\Barcode\Renderer\AbstractRenderer::drawPolygon()

Parameters

$points

array

$color

integer

$filled

boolean

Draw a polygon in the rendering resource

drawPolygon(array $points, integer $color, boolean $filled = true
Inherited

Parameters

$points

array

$color

integer

$filled

boolean

Draw a polygon in the rendering resource

drawText(string $text, float $size, array $position, string $font, integer $color, string $alignment = 'center', float $orientation = 0
inherited_from \Zend\Barcode\Renderer\AbstractRenderer::drawText()

Parameters

$text

string

$size

float

$position

array

$font

string

$color

integer

$alignment

string

$orientation

float

Draw a polygon in the rendering resource

drawText(string $text, float $size, array $position, string $font, integer $color, string $alignment = 'center', float|integer $orientation = 0
Inherited

Parameters

$text

string

$size

float

$position

array

$font

string

$color

integer

$alignment

string

$orientation

floatinteger

Initialize the PDF resource

initRenderer() : void
inherited_from \Zend\Barcode\Renderer\AbstractRenderer::initRenderer()

Initialize the rendering resource

initRenderer() : void
Inherited

Sub process to draw the barcode instructions Needed by the automatic error rendering

drawInstructionList() 
Inherited

 Properties

 

Activate/Deactivate the automatic rendering of exception

$automaticRenderError : boolean

Default

false
 

Barcode object

$barcode : \Zend\Barcode\Object\ObjectInterface

Default

 

Horizontal position of the barcode in the rendering resource

$horizontalPosition : string

Default

'left'
 

Offset of the barcode from the left of the rendering resource

$leftOffset : integer

Default

0
 

Module size rendering

$moduleSize : float

Default

0.5
inherited_from \Zend\Barcode\Renderer\AbstractRenderer::moduleSize
 

Module size rendering

$moduleSize : float

Default

1
 

Page number in PDF resource

$page : integer

Default

0
 

Namespace of the renderer for autoloading

$rendererNamespace : string

Default

'Zend\Barcode\Renderer'
 

PDF resource

$resource : \ZendPdf\PdfDocument

Default

null
inherited_from \Zend\Barcode\Renderer\AbstractRenderer::resource
 

Drawing resource

$resource 

Default

 

Offset of the barcode from the top of the rendering resource

$topOffset : integer

Default

0
 

Show a transparent background

$transparentBackground : Boolean

Default

false
 

Renderer type

$type : string

Default

null
 

Vertical position of the barcode in the rendering resource

$verticalPosition : string

Default

'top'