[reportlab-users] LayoutError - table doesn't fit on a page

Aljoša Mohorović aljosa.mohorovic at gmail.com
Thu Feb 17 11:29:06 EST 2011


i'm getting this error because table is larger than page but i don't
know how to tell doc/table to expand to next page.
any help appreciated.

Aljosa Mohorovic

exception:
==========================
Exception Type: LayoutError
Exception Value:
Flowable <Table at 0x01F609E0 1 rows x 2 cols> with cell(0,0) containing
'<Image at 0x27680e0 filename=<File:
/home/aljosa/Projects/Sites/gin/media/photologue/photos/10.jpg>>'(583.275590551
x 906) too large on page 2 in frame 'normal'(583.275590551 x
829.88976378*) of template 'Later'
Exception Location: /home/aljosa/Projects/Sites/gin/env/lib/python2.6/site-packages/reportlab/platypus/doctemplate.py
in handle_flowable, line 793

code:
==========================
elements = []

title_style = TitleStyle("title")
para_style = ParagraphStyle("paragraph")

doc = SimpleDocTemplate(fp, pagesize=A4, showBoundary=1, leftMargin=0,
rightMargin=0, topMargin=0, bottomMargin=0, allowSplitting=1)

elements.append(Paragraph(item.name, title_style))
elements.append(Spacer(1, 1*inch))

photos = []
# appended 3 images to photos

ts = # table style
table = Table(data, style=ts)
elements.append(table)

doc.build(elements)


More information about the reportlab-users mailing list