Custom page lengths
Glenn Linderman <[email protected]>
| Newsgroups | gmane.comp.python.reportlab.user |
|---|---|
| Message-ID | <[email protected]> |
I'm wondering if there is a way to dynamically alter the page length based on the content. Data is organized into pages of related information; but the data is variable length. Nearly every device has some sort of PDF viewer; multiple screen size abound. Already coded: formatting the data to different widths so that it is easier to read on various devices from cell phone to tablets, with reasonable font sizes and not needed to scroll sideways. But that means that the already variable amount of data on the page gets exacerbated at small widths; for viewers that have an option to scroll pages horizontally, it isn't to bad to have long pages for all pages, even though only a few need them. But for viewers that scroll pages vertically, there is a lot of white space to skip. Variable size pages would help this. I already have a PgBrk callback to make sure that the data stays on one page (so I can length the page until I quit getting errors from that callback. But I simply don't know if it is possible to set the page size dynamically, after it is known where the last data falls... or, really, to know exactly where the last data falls. Has anyone done anything like this before, or have ideas where to start?