public function addPdfLabel(string $text)
    {
        if ($this->countX == $this->xNumber) {
            // Page full, we start a new one
            $this->AddPage();
            $this->countX = 0;
            $this->countY = 0;
        }

        $posX = $this->marginLeft + ($this->countX * ($this->width + $this->xSpace));
        $posY = $this->marginTop + ($this->countY * ($this->height + $this->ySpace));

        $this->SetXY($posX + $this->paddingLeft, $posY + $this->paddingTop);

        $this->generateLabel($text);

        $this->countY++;
        if ($this->countY == $this->yNumber) {
            // End of column reached, we start a new one
            $this->countX++;
            $this->countY = 0;
        }
    }
public function addPdfLabel(string $text)
    {
        if ($this->countX == $this->xNumber) {
            // Page full, we start a new one
            $this->AddPage();
            $this->countX = 0;
            $this->countY = 0;
        }

        $posX = $this->marginLeft + ($this->countX * ($this->width + $this->xSpace));
        $posY = $this->marginTop + ($this->countY * ($this->height + $this->ySpace));

        $this->SetXY($posX + $this->paddingLeft, $posY + $this->paddingTop);

        $this->generateLabel($text);

        $this->countY++;
        if ($this->countY == $this->yNumber) {
            // End of column reached, we start a new one
            $this->countX++;
            $this->countY = 0;
        }
    }
public function addPdfLabel ( string $ text ) { if ( $ this -> countX == $ this -> xNumber ) { // Page full, we start a new one $ this -> AddPage ( ) ; $ this -> countX = 0 ; $ this -> countY = 0 ; } $ posX = $ this -> marginLeft + ( $ this -> countX * ( $ this -> width + $ this -> xSpace ) ) ; $ posY = $ this -> marginTop + ( $ this -> countY * ( $ this -> height + $ this -> ySpace ) ) ; $ this -> SetXY ( $ posX + $ this -> paddingLeft , $ posY + $ this -> paddingTop ) ; $ this -> generateLabel ( $ text ) ; $ this -> countY ++ ; if ( $ this -> countY == $ this -> yNumber ) { // End of column reached, we start a new one $ this -> countX ++ ; $ this -> countY = 0 ; } }
Print a label.

@param string $text
Print a label .