[reportlab-users] How to mix static positioning and flowables

Mike Driscoll mike at pythonlibrary.org
Mon Aug 19 09:51:19 EDT 2013


Hi Robin,

I actually figured out a way to get this to work using a template. I ended
up writing a tutorial about it since I'm guessing I'll probably end up
needing to do this again some time in the future...and for all the other
people who have to do this sort of thing. My tutorial is here:
http://www.blog.pythonlibrary.org/2013/08/09/reportlab-how-to-combine-static-content-and-multipage-tables/

Thanks and have a great day!
Mike



On Mon, Aug 19, 2013 at 4:39 AM, Robin Becker <robin at reportlab.com> wrote:


> Mike,

>

> flowables determine their height width etc etc in the wrap function and

> then a framelike object is supposed to position the flowable in a top down

> fashion. That means we have to adjust the y location based on the height of

> the flowable see reportlab/platypus/frames.py near line 166

>

> y -= h

>

> effectively moves the draw location down the frame by the required height.

>

> Our coordinates are standard y increases upwards, but page layout is like

> TV.

>

>

>

> On 08/08/2013 20:29, Mike Driscoll wrote:

>

>> Hi,

>>

>> I have been experimenting using the table and I notice that when I use

>> table.drawOn(), it changes position depending on how many rows of data I

>> pass the table. Why won't the table start at the position I'm passing it

>> every single time?

>>

>> Right now, my plan is to find out how many rows of data I can fit on the

>> bottom half of the page and then add a check that says, if number of rows

>> is greater than X, only pass X rows of data to the table and save the

>> following rows into a new list. Then I'll add a page break, create a new

>> table and pass it the new list. However since the table refuses to

>> actually

>> stay where I tell it, I'm not sure I can even use a table object at this

>> point. Any suggestions?

>>

>> - Mike

>>

> .......

> --

> Robin Becker

>




--
-----------------
Mike Driscoll

Blog: http://blog.pythonlibrary.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20130819/2410087d/attachment.html>


More information about the reportlab-users mailing list