SpaceY in the label definition is (presumably) mean't to specify a y-offset for the label. What happens is that this offset if multiplied by the number of labels and so the labels no longer line up properly.
The problem is at line 182 of mailing_label-ufpdf.php.
The code:
$posY = $this->marginTop+($this->countY*($this->height+$this->ySpace));
should be replaced with:
$posY = $this->marginTop+($this->countY*($this->height)+$this->ySpace);
i.e. the ySpace offset will be added only once, rather than multiplied by countY first. This produces the right behaviour. It's not as obvious as it sounds, because $posX is calculated in the same way, and it works for $posX, but not for $posY. Presumably because of the way that the X position is handled inside the MultiCell() and Cell() methods.
Of course, since the module doesn't permit you to adjust the y-offset and all the ySpace values are set to 0 for the possible labels this bug doesn't appear. However, it does once someone starts to alter the label definitions.
Comments
Comment #1
bluegeek9 commented