I think Werner's fix is probably correct, but I have no cycles to test right now. Please commit it; the worst that could happen is that it turns out to be wrong and we revert the commit.

Paul

On 4/22/14, 1:18 PM, John Fabiani wrote:
OK it looks good to me.  That said, I haven't really checked the code
for years.  I'd wait to commit until Paul had his say.
Johnf
On 04/22/2014 09:21 AM, Werner wrote:
Hi John,

Lets try it with values, as this is giving me grey hairs.

My page is A4, it has four columns of labels which are 45.7 x 25.4 mm,
column spacing is 2.5 mm and left and right margin is 10 mm

with the current code this means:

columnPadding = self._columnPadding =
self.getPt(_form.getProp("columnPadding")) * (columnCount - 1)
2.5 * 3 = 7.5

and the result of:

columnWidth = self._columnWidth = \
            ((self._pageWidth - self._ml - self._mr) /
self._columnCount) - (.5 * self._columnPadding)

(210 - 10 - 10) / 4 - (0.5 * 7.5) = 43.25

if columnPadding where 2.5 then we would get:
(210 - 10 - 10) / 4 - (0.5 * 2.5) = 45.75

So, your where right my first proposal for the new code was wrong, it
should be (just one line change):

        columnPadding = self._columnPadding =
self.getPt(_form.getProp("columnPadding"))
        columnWidth = self._columnWidth = \
             ((self._pageWidth - self._ml - self._mr) /
self._columnCount) - (.5 * self._columnPadding)

I don't see that we need a variable for 'totalPadding'.

With above my labels work if I define the column padding as 2.5 mm.

Werner
_______________________________________________
Post Messages to: [email protected]
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/[email protected]

_______________________________________________
Post Messages to: [email protected]
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/[email protected]

_______________________________________________
Post Messages to: [email protected]
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/[email protected]

Reply via email to