[reportlab-users] Keeping track of page breaks in tables

Robin Becker robin at reportlab.com
Thu May 7 04:44:14 EDT 2009


Dinu Gherman wrote:

> Hi,

>

> In a project using PDF backdrops combined via pyPdf with dynamically

> generated PDF I need to select the backdrop pages from a multi-page

> PDF file based on the current content. So I need to know how many

> page breaks a table generates - but without running multiple render-

> ing passes. I wonder what the best strategy would be for doing this?

>

> Thanks,

>

> Dinu

.........
well you could render just the table using a fake frame set; that's effectively
the only way to know how long it's going to be unless the table structure is re
ally simple and computable.

Is it actually the best strategy though? The reportlab doctemplate provides
hooks to let you know when pages have changed so in the RL world you just slurp
in the page from the PDF before allowing the rest of the story to be handled.


--
Robin Becker


More information about the reportlab-users mailing list