Class for rendering the barcode in PDF resource

 Methods

Constructor

__construct(array | \Traversable $options) 
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::__construct()

Parameters

$options

array\Traversable

Checking of parameters after all settings

checkParams() : bool
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::checkParams()

Returns

bool

Draw the barcode in the rendering resource

draw() : mixed
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::draw()

Exceptions

\Zend\Barcode\Exception\ExceptionInterface

Returns

mixed

Retrieve the automatic rendering of exception

getAutomaticRenderError() : bool
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::getAutomaticRenderError()

Returns

bool

Retrieve the barcode object

getBarcode() : \Zend\Barcode\Object\ObjectInterface
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::getBarcode()

Returns

Horizontal position of the barcode in the rendering resource

getHorizontalPosition() : string
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::getHorizontalPosition()

Returns

string

Retrieve vertical adjustment

getLeftOffset() : int
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::getLeftOffset()

Returns

int

Set the size of a module

getModuleSize() : float
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::getModuleSize()

Returns

float

Retrieve renderer namespace

getRendererNamespace() : string
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::getRendererNamespace()

Returns

string

Retrieve vertical adjustment

getTopOffset() : int
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::getTopOffset()

Returns

int

getTransparentBackground()

getTransparentBackground() : bool
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::getTransparentBackground()

Returns

bool

Retrieve renderer type

getType() : string
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::getType()

Returns

string

Vertical position of the barcode in the rendering resource

getVerticalPosition() : string
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::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(bool $value) : \Zend\Barcode\Renderer\AbstractRenderer
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::setAutomaticRenderError()

Parameters

$value

bool

Returns

Set the barcode object

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

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::setBarcode()

Parameters

Returns

Horizontal position of the barcode in the rendering resource

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

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::setHorizontalPosition()

Parameters

$value

string

Exceptions

\Zend\Barcode\Renderer\Exception\UnexpectedValueException

Returns

Manually adjust left position

setLeftOffset(int $value) : \Zend\Barcode\Renderer\AbstractRenderer
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::setLeftOffset()

Parameters

$value

int

Exceptions

\Zend\Barcode\Renderer\Exception\OutOfRangeException

Returns

Set the size of a module

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

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::setModuleSize()

Parameters

$value

float

Exceptions

\Zend\Barcode\Renderer\Exception\OutOfRangeException

Returns

Set renderer state from options array

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

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::setOptions()

Parameters

$options

array

Returns

Set renderer namespace for autoloading

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

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::setRendererNamespace()

Parameters

$namespace

string

Returns

Set a PDF resource to draw the barcode inside

setResource(\ZendPdf\PdfDocument $pdf, int $page) : \Zend\Barcode\Renderer\Pdf

Parameters

$pdf

\ZendPdf\PdfDocument

$page

int

Returns

Manually adjust top position

setTopOffset(int $value) : \Zend\Barcode\Renderer\AbstractRenderer
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::setTopOffset()

Parameters

$value

int

Exceptions

\Zend\Barcode\Renderer\Exception\OutOfRangeException

Returns

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

setTransparentBackground($bool) : \Zend\Barcode\Renderer\$this
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::setTransparentBackground()

Parameters

$bool

Returns

\Zend\Barcode\Renderer\$this

Vertical position of the barcode in the rendering resource

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

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::setVerticalPosition()

Parameters

$value

string

Exceptions

\Zend\Barcode\Renderer\Exception\UnexpectedValueException

Returns

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

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::adjustPosition()

Parameters

$supportHeight

float

$supportWidth

float

Check if a barcode object is correctly provided

checkBarcodeObject() : void
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::checkBarcodeObject()

Exceptions

\Zend\Barcode\Renderer\Exception\RuntimeException

Check renderer parameters

checkSpecificParams() : void

Draw a polygon in the rendering resource

drawPolygon(array $points, int $color, bool $filled) 

Parameters

$points

array

$color

int

$filled

bool

Draw a polygon in the rendering resource

drawText(string $text, float $size, array $position, string $font, int $color, string $alignment, float $orientation) 

Parameters

$text

string

$size

float

$position

array

$font

string

$color

int

$alignment

string

$orientation

float

Initialize the PDF resource

initRenderer() : void

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

drawInstructionList() 
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::drawInstructionList()

 Properties

 

Activate/Deactivate the automatic rendering of exception

$automaticRenderError : bool
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::$$automaticRenderError
 

Barcode object

$barcode : \Zend\Barcode\Object\ObjectInterface
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::$$barcode
 

Horizontal position of the barcode in the rendering resource

$horizontalPosition : int
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::$$horizontalPosition
 

Offset of the barcode from the left of the rendering resource

$leftOffset : int
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::$$leftOffset
 

Module size rendering

$moduleSize : float

 

Page number in PDF resource

$page : int

 

Namespace of the renderer for autoloading

$rendererNamespace : string
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::$$rendererNamespace
 

PDF resource

$resource : \ZendPdf\PdfDocument

 

Offset of the barcode from the top of the rendering resource

$topOffset : int
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::$$topOffset
 

Show a transparent background

$transparentBackground : Boolean
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::$$transparentBackground
 

Renderer type

$type : string
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::$$type
 

Vertical position of the barcode in the rendering resource

$verticalPosition : int
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::$$verticalPosition