https://issues.apache.org/bugzilla/show_bug.cgi?id=51043

--- Comment #8 from Pascal Sancho <pascal.san...@takoma.fr> 2011-04-12 04:12:29 
EDT ---
(In reply to comment #3)
> page-width = 210mm = 595275(.5907)
(...)
> => 595275 - 82204 - 2834 = 510237
Hmm?
210 * 72000 / 25.4 = 595275.5905512
and: rounding page-with should give 595276 mpt

Note that when using rounded rather than truncated values, the problem remains.

(In reply to comment #6)
> (...) unless we either start storing the
> mpt values as double, and truncate only the result, or calculate with the
> original value, including the units. In that case, it would work here, too: 
> 210
> - 30 = 210 - 1 - 29 = 180.

Due to conversion side effects, I fully agree with that. There should remain
only one value to be rounded, rather 3 in this use-case.

(In reply to comment #5)
> I have run into this before myself. For me an acceptable workaround was to
> change the units of left/right margins to match and avoid the rounding errors,
> (...) I changed the units to
> match left-margin="10pt" right-margin="30pt"

Too, this is acceptable for me. I tried 'in' witch gives expected behavior.

Finally, since 'mm' to 'in' conversion is not based on an integer ratio, the 2
alternatives are:
 - avoid such conversion (workaround),
 - convert floats.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to