You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SPACER = Spacer(0, 10)
buff = BytesIO()
doc = SimpleDocTemplate(buff, rightMargin=0.2 * inch,
leftMargin=0.2 * inch,\
topMargin=100, bottomMargin=68)
elements = []
# here add elements
elements.append(SPACER)
# here add more elements
doc.build(elements)
I sometimes get this exception:
File "/venv/lib/python2.7/site-packages/reportlab/platypus/doctemplate.py", line 1171, in build
BaseDocTemplate.build(self,flowables, canvasmaker=canvasmaker)
File "/venv/lib/python2.7/site-packages/reportlab/platypus/doctemplate.py", line 927, in build
self.handle_flowable(flowables)
File "/venv/lib/python2.7/site-packages/reportlab/platypus/doctemplate.py", line 829, in handle_flowable
raise LayoutError(ident)
LayoutError: Flowable <Spacer at 0x4c87d40 frame=normal>...(0 x 10) too large on page 2 in frame 'normal'(554.475590551 x 661.88976378) of template 'Later'
With reportlab 3.2.0, I get
I sometimes get this exception:
This is happening when trying to insert the SPACER near the bottom of the page.
Increasing bottomMargin would avoid the exception meaning that whenever
SPACER height * character height >= doc.bottomMargin
the reporter might fail if the space is close to the bottom of the page.
discussed:
http://stackoverflow.com/questions/35494584/reportlab-layouterror-flowable-spacer-too-large/35516604#35516604
The expected behavious is that it should not fail. It should somehow handle that.
The text was updated successfully, but these errors were encountered: