* function to Print a label
*/
function AddPdfLabel($texte) {
+ 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->countX++;
$this->countY = 0;
}
-
- if ($this->countX == $this->xNumber) {
- // Page full, we start a new one
- $this->countX = 0;
- $this->countY = 0;
- }
-
- // We are in a new page, then we must add a page
- if (($this->countX == 0) and ($this->countY == 0)) {
- $this->AddPage();
- }
}
function getFontNames() {