Class Xml2PdfTag_barcode

Description

<barcode> tag.

draw an EAN13 or UPC-A codebar (based on a script of FPDF).

  1. <barcode x="20" y="20" barcode="654987576532" norm="EAN13"/>

Located in /plugins/tags/xml2pdf.tag.barcode.php (line 41)

Xml2PdfTag
   |
   --Xml2PdfTag_barcode
Variable Summary
 string $barcode
 float $height
 string $norm
 string $position
 float $width
 float $x
 float $y
 integer $_len
Method Summary
 void __construct (object $pdf,  &$attrs, array $attrs)
 void close ()
 integer _getCheckDigit (string $barcode)
 void _render ()
 boolean _testCheckDigit (string $barcode)
Variables
string $barcode = '' (line 72)

bar code

  • access: protected
float $height = 16 (line 66)

bar height

  • access: protected
string $norm = 'EAN13' (line 78)

norm

  • access: protected
string $position = 'relative' (line 84)

positionning type

  • access: protected
float $width = 0.35 (line 60)

bar width

  • access: protected
float $x = 0 (line 48)

x pos

  • access: protected
float $y = 0 (line 54)

y pos

  • access: protected
integer $_len = 13 (line 90)

bar code number of characters

  • access: private

Inherited Variables

Inherited from Xml2PdfTag

Xml2PdfTag::$content
Xml2PdfTag::$pdf
Methods
Constructor __construct (line 104)

Constructor.

Parse the tag properties.

  • access: public
void __construct (object $pdf,  &$attrs, array $attrs)
  • object $pdf: object Pdf
  • array $attrs: tag properties
  • &$attrs

Redefinition of:
Xml2PdfTag::__construct()
Constructor.
close (line 129)

Close the tag and launch the render.

Calcul the bar code length and the real coordonate then launch the traitment to draw the bar code.

  • access: public
void close ()

Redefinition of:
Xml2PdfTag::close()
Close tag.
_getCheckDigit (line 217)

Generate a check digit to the bar code.

  • access: private
integer _getCheckDigit (string $barcode)
  • string $barcode: bar code
_render (line 153)

bar code renderer.

Generate the bar code and add it to the pdf.

  • access: private
void _render ()
_testCheckDigit (line 239)

Check the check digit.

  • access: private
boolean _testCheckDigit (string $barcode)
  • string $barcode: bar code.

Inherited Methods

Inherited From Xml2PdfTag

 Xml2PdfTag::__construct()
 Xml2PdfTag::addContent()
 Xml2PdfTag::close()

Documentation generated on Wed, 11 Oct 2006 22:27:18 +0200 by phpDocumentor 1.3.0