On 04/22/2014 08:00 AM, Werner wrote:
Hi,

I have an Avery L7654 A4 label sheet which I try to define.

It has a 2.5mm column padding but if I define that for the labels column 2 - 4 move over to the right to much, currently I have it defined as 0.5 mm and it is about correct.

Looking into the code I see in reportWriter this:

around line 2289 in the write method
        # Get the number of columns:
        columnCount = self._columnCount = _form.getProp("columnCount")
columnPadding = self._columnPadding = self.getPt(_form.getProp("columnPadding")) * (columnCount - 1)
        columnWidth = self._columnWidth = \
((self._pageWidth - self._ml - self._mr) / self._columnCount) - (.5 * self._columnPadding)

and around line 2525 in the printBand method:

x = ml + (self._currentColumn * (self._columnWidth + self._columnPadding))

I think the first block should be (untested):
        # Get the number of columns:
        columnCount = self._columnCount = _form.getProp("columnCount")
columnPadding = self._columnPadding = self.getPt(_form.getProp("columnPadding"))
        columnWidth = self._columnWidth = \
((self._pageWidth - self._ml - self._mr) / self._columnCount) - (self._columnPadding * (columnCount - 1))

What do others think?

Is anyone using columnPadding with their labels?

Werner

I believe I understand what you are doing but I don't under why the old code is wrong. It would seem that 1/2 of the self._columnPadding would be correct because later it is used as the location to start printing. At least that is what I recall from the code. I would suspect that your issue comes from code like this
x = ml + (self._currentColumn * (self._columnWidth + self._columnPadding)) .

I could be totally wrong but when Larry Long was working with the problem several years ago the issue of padding was discussed. But was not completely fixed at the time.

Johnf

_______________________________________________
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/53568ac3.2060...@jfcomputer.com

Reply via email to