public function myBarcode($code, $type, $x, $y, $w, $h, $labelFontsize, $color, $dimension = '1D')
    {
        // the style of the barcode
        $style = array(
            'position' => 'S',
            'text' => ($labelFontsize ? true : false),
            'fgcolor' => $color,
            'bgcolor' => false,
        );

        // build the barcode
        if ($dimension === '2D') {
            // PDF417, DATAMATRIX ...
            $this->write2DBarcode($code, $type, $x, $y, $w, $h, '', $style, 'N');
        } else {
            $this->write1DBarcode($code, $type, $x, $y, $w, $h, '', $style, 'N');
        }

        // it Label => add the FontSize to the height
        if ($labelFontsize) {
            $h+= $labelFontsize;
        }

        // return the size of the barcode
        return array($w, $h);
    }