[reportlab-users] Doing multiple pages with variable data
Tim Roberts
timr at probo.com
Mon Jul 6 14:45:23 EDT 2009
Mike Driscoll wrote:
>
> I know this is probably a common question, but I'm not finding the
> answer in the archives so far. I have a large dataset with varied
> lengths of data. Basically, it will be a list of lists or a list of
> dicts. Anyway, I don't really know how much will be able to fit per
> page with my current requirements. What is the recommended way of
> putting semi-random data onto multiple pages and getting it to break
> correctly? Do I have to count the number of lines I've output somehow?
I guess it depends on how much you need to do to the data. Platypus is
really good at managing documents that consist of a series of
"flowables". If your data can be arranged in a series of things of
variable height that are page-wide, then what you ask is pretty easy.
You can just derive your own class from Paragraph and lay things out
yourself.
If you need spreadsheet-like functionality, where things need to break
within cells and cells can be arbitrarily large, that's where things get
really tricky.
--
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the reportlab-users
mailing list