Zend Framework
3.0
|
Class for rendering the barcode in PDF resource. More...
Public Member Functions | |
setResource (PdfDocument $pdf, $page=0) | |
Set a PDF resource to draw the barcode inside. | |
render () | |
Draw the barcode in the PDF, send headers and the PDF. | |
widthForStringUsingFontSize ($text, $font, $fontSize) | |
Calculate the width of a string: in case of using alignment parameter in drawText. | |
Public Member Functions inherited from AbstractRenderer | |
__construct ($options=null) | |
Constructor. | |
setOptions ($options) | |
Set renderer state from options array. | |
setRendererNamespace ($namespace) | |
Set renderer namespace for autoloading. | |
getRendererNamespace () | |
Retrieve renderer namespace. | |
setTransparentBackground ($bool) | |
Set whether background should be transparent Will work for SVG and Image (png and gif only) | |
getTransparentBackground () | |
getType () | |
Retrieve renderer type. | |
setTopOffset ($value) | |
Manually adjust top position. | |
getTopOffset () | |
Retrieve vertical adjustment. | |
setLeftOffset ($value) | |
Manually adjust left position. | |
getLeftOffset () | |
Retrieve vertical adjustment. | |
setAutomaticRenderError ($value) | |
Activate/Deactivate the automatic rendering of exception. | |
setHorizontalPosition ($value) | |
Horizontal position of the barcode in the rendering resource. | |
getHorizontalPosition () | |
Horizontal position of the barcode in the rendering resource. | |
setVerticalPosition ($value) | |
Vertical position of the barcode in the rendering resource. | |
getVerticalPosition () | |
Vertical position of the barcode in the rendering resource. | |
setModuleSize ($value) | |
Set the size of a module. | |
getModuleSize () | |
Set the size of a module. | |
getAutomaticRenderError () | |
Retrieve the automatic rendering of exception. | |
setBarcode (Object\ObjectInterface $barcode) | |
Set the barcode object. | |
getBarcode () | |
Retrieve the barcode object. | |
checkParams () | |
Checking of parameters after all settings. | |
draw () | |
Draw the barcode in the rendering resource. | |
Public Member Functions inherited from RendererInterface | |
setBarcode (ObjectInterface $barcode) | |
Set the barcode object. | |
Protected Member Functions | |
checkSpecificParams () | |
Check renderer parameters. | |
initRenderer () | |
Initialize the PDF resource. | |
drawPolygon ($points, $color, $filled=true) | |
Draw a polygon in the rendering resource. | |
drawText ($text, $size, $position, $font, $color, $alignment= 'center', $orientation=0) | |
Draw a polygon in the rendering resource. | |
Protected Member Functions inherited from AbstractRenderer | |
checkBarcodeObject () | |
Check if a barcode object is correctly provided. | |
adjustPosition ($supportHeight, $supportWidth) | |
Calculate the left and top offset of the barcode in the rendering support. | |
checkSpecificParams () | |
Checking of parameters after all settings. | |
initRenderer () | |
Initialize the rendering resource. | |
drawPolygon ($points, $color, $filled=true) | |
Draw a polygon in the rendering resource. | |
drawText ($text, $size, $position, $font, $color, $alignment= 'center', $orientation=0) | |
Draw a polygon in the rendering resource. | |
Protected Attributes | |
$resource = null | |
$page = 0 | |
$moduleSize = 0.5 | |
Protected Attributes inherited from AbstractRenderer | |
$rendererNamespace = 'Zend\Barcode\Renderer' | |
$type = null | |
$automaticRenderError = false | |
$topOffset = 0 | |
$leftOffset = 0 | |
$horizontalPosition = 'left' | |
$verticalPosition = 'top' | |
$moduleSize = 1 | |
$barcode | |
$resource | |
Drawing resource. | |
$transparentBackground = false | |
Class for rendering the barcode in PDF resource.
|
protected |
Check renderer parameters.
|
protected |
Draw a polygon in the rendering resource.
array | $points | |
int | $color | |
bool | $filled |
|
protected |
Draw a polygon in the rendering resource.
string | $text | |
float | $size | |
array | $position | |
string | $font | |
int | $color | |
string | $alignment | |
float | $orientation |
|
protected |
Initialize the PDF resource.
render | ( | ) |
setResource | ( | PdfDocument | $pdf, |
$page = 0 |
|||
) |
widthForStringUsingFontSize | ( | $text, | |
$font, | |||
$fontSize | |||
) |
Calculate the width of a string: in case of using alignment parameter in drawText.
string | $text | |
Font | $font | |
float | $fontSize |
|
protected |
|
protected |
|
protected |