Permalink
Browse files

Fix a column width related bug introduced in commit 5bc1328.

  • Loading branch information...
1 parent db90b59 commit b27760a5c3562412fd39e4993683cf80de6ab20a @abravetti abravetti committed Jun 13, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 xhtml2pdf/xhtml2pdf_reportlab.py
@@ -786,7 +786,8 @@ def wrap(self, availWidth, availHeight):
if sum(newColWidths) > totalWidth:
quotient = totalWidth / sum(newColWidths)
# print quotient
- newColWidths = [w * quotient for w in newColWidths]
+ for i in range(len(newColWidths)):
+ newColWidths[i] = newColWidths[i] * quotient
# To avoid rounding errors adjust one col with the difference
diff = sum(newColWidths) - totalWidth

0 comments on commit b27760a

Please sign in to comment.