Skip to content

Commit

Permalink
Merge pull request #57 from abravetti/patch-3
Browse files Browse the repository at this point in the history
Fix a column width related bug introduced in commit 5bc1328.
  • Loading branch information
chrisglass committed Jun 14, 2012
2 parents db90b59 + b27760a commit ac0a3a8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xhtml2pdf/xhtml2pdf_reportlab.py
Expand Up @@ -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
Expand Down

0 comments on commit ac0a3a8

Please sign in to comment.