Dynamic Spacer in ReportLab
Posted
by ptikobj
on Stack Overflow
See other posts from Stack Overflow
or by ptikobj
Published on 2010-04-27T15:13:01Z
Indexed on
2010/04/27
15:13 UTC
Read the original article
Hit count: 317
I'm automatically generating a PDF-file with Platypus that has dynamic content.
This means that it might happen that the length of the text content (which is directly at the bottom of the pdf-file) may vary.
However, it might happen that a page break is done in cases where the content is too long. This is because i use a "static" spacer:
s = Spacer(width=0, height=23.5*cm)
as i always want to have only one page, I somehow need to dynamically set the height of the Spacer, so that it takes the "rest" of the space that is on the page as its height.
Now, how do i get the "rest" of height that is left on my page?
© Stack Overflow or respective owner