'Reportlab add space between Balanced columns
For the balanced column in reportlab, I want to increase the spacing between the columns so that no text gets very close to each other and there is a clear separation between them.
In the user guide of reportlab, I couldn't find any solution for the same.
from reportlab.lib.pagesizes import letter, A4
from reportlab.platypus import SimpleDocTemplate, Paragraph
from reportlab.lib.units import mm
from reportlab.platypus.flowables import BalancedColumns
from reportlab.platypus import Spacer, SimpleDocTemplate, Table, TableStyle, PageBreak
from reportlab.pdfbase import pdfmetrics
f = []
for i in range(10):
f.append(Paragragh("Write some length paragraph here .."))
f.append(Spacer(2*mm))
balancedCol = BalancedColumns(f, nCols=2, innerPadding=2*mm)
story = [balancedCol]
doc = SimpleDocTemplate('balancedCol.pdf')
doc.build(story)
The following image shows the space that I want to change or update.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|