Zend\Barcode\Renderer\Pdf
Class for rendering the barcode in PDF resource
Synopsis
class Pdf
extends AbstractRenderer
{
- // members
- protected PdfDocument $resource;
- protected integer $page;
- protected float $moduleSize;
- // Inherited members from AbstractRenderer
- protected string $rendererNamespace;
- protected string $type;
- protected bool $automaticRenderError;
- protected integer $topOffset;
- protected integer $leftOffset;
- protected string $horizontalPosition;
- protected string $verticalPosition;
- protected integer $moduleSize;
- protected ObjectInterface $barcode;
- protected $resource;
- protected Boolean $transparentBackground;
- // methods
- public Pdf setResource()
- protected void checkSpecificParams()
- public mixed render()
- protected void initRenderer()
- protected void drawPolygon()
- protected void drawText()
- public float widthForStringUsingFontSize()
- // Inherited methods from AbstractRenderer
- public void __construct()
- public AbstractRenderer setOptions()
- public AbstractRenderer setRendererNamespace()
- public string getRendererNamespace()
- public $this setTransparentBackground()
- public bool getTransparentBackground()
- public string getType()
- public AbstractRenderer setTopOffset()
- public int getTopOffset()
- public AbstractRenderer setLeftOffset()
- public int getLeftOffset()
- public AbstractRenderer setAutomaticRenderError()
- public AbstractRenderer setHorizontalPosition()
- public string getHorizontalPosition()
- public AbstractRenderer setVerticalPosition()
- public string getVerticalPosition()
- public AbstractRenderer setModuleSize()
- public float getModuleSize()
- public bool getAutomaticRenderError()
- public AbstractRenderer setBarcode()
- public ObjectInterface getBarcode()
- public bool checkParams()
- protected void checkBarcodeObject()
- protected void adjustPosition()
- public mixed draw()
- protected abstract void checkSpecificParams()
- protected abstract void initRenderer()
- protected abstract void drawPolygon()
- protected abstract void drawText()
Hierarchy
Members
protected
- $automaticRenderError
—
Zend\Barcode\Renderer\bool
Activate/Deactivate the automatic rendering of exception - $barcode
—
Zend\Barcode\Renderer\Object\ObjectInterface
Barcode object - $horizontalPosition
—
int
Horizontal position of the barcode in the rendering resource - $leftOffset
—
int
Offset of the barcode from the left of the rendering resource - $moduleSize
—
float
Module size rendering - $moduleSize
—
float
Module size rendering - $page
—
int
Page number in PDF resource - $rendererNamespace
—
string
Namespace of the renderer for autoloading - $resource
—
ZendPdf\PdfDocument
PDF resource -
$resource
Drawing resource - $topOffset
—
int
Offset of the barcode from the top of the rendering resource - $transparentBackground
—
Zend\Barcode\Renderer\Boolean
Show a transparent background - $type
—
string
Renderer type - $verticalPosition
—
int
Vertical position of the barcode in the rendering resource
Methods
protected
- checkSpecificParams() — Check renderer parameters
- drawPolygon() — Draw a polygon in the rendering resource
- drawText() — Draw a polygon in the rendering resource
- initRenderer() — Initialize the PDF resource
public
- render() — Draw the barcode in the PDF, send headers and the PDF
- setResource() — Set a PDF resource to draw the barcode inside
- widthForStringUsingFontSize() — Calculate the width of a string: in case of using alignment parameter in drawText
Inherited from Zend\Barcode\Renderer\AbstractRenderer
protected
- adjustPosition() — Calculate the left and top offset of the barcode in the rendering support
- checkBarcodeObject() — Check if a barcode object is correctly provided
- checkSpecificParams() — Checking of parameters after all settings
- drawPolygon() — Draw a polygon in the rendering resource
- drawText() — Draw a polygon in the rendering resource
- initRenderer() — Initialize the rendering resource
public
- checkParams() — Checking of parameters after all settings
- draw() — Draw the barcode in the rendering resource
- getAutomaticRenderError() — Retrieve the automatic rendering of exception
- getBarcode() — Retrieve the barcode object
- getHorizontalPosition() — Horizontal position of the barcode in the rendering resource
- getLeftOffset() — Retrieve vertical adjustment
- getModuleSize() — Set the size of a module
- getRendererNamespace() — Retrieve renderer namespace
- getTopOffset() — Retrieve vertical adjustment
- getTransparentBackground()
- getType() — Retrieve renderer type
- getVerticalPosition() — Vertical position of the barcode in the rendering resource
- setAutomaticRenderError() — Activate/Deactivate the automatic rendering of exception
- setBarcode() — Set the barcode object
- setHorizontalPosition() — Horizontal position of the barcode in the rendering resource
- setLeftOffset() — Manually adjust left position
- setModuleSize() — Set the size of a module
- setOptions() — Set renderer state from options array
- setRendererNamespace() — Set renderer namespace for autoloading
- setTopOffset() — Manually adjust top position
- setTransparentBackground() — Set whether background should be transparent Will work for SVG and Image (png and gif only)
- setVerticalPosition() — Vertical position of the barcode in the rendering resource