[reportlab-users] Nested Flowables?

Kevin D Smith Kevin.Smith at sixquickrun.com
Thu Jan 7 10:50:03 EST 2010


I did find out part of my problem. My outer flowable was being drawn, then the next one was drawn above it which happened to be above the page. So I'm trying to figure out how to get the placement of the nested flowables correct. I can't quite follow what's going on with them right now because they go off the page. I've tried doing translates after each nested flowable to put the cursor back into the correct place, but that doesn't seem to be working reliably for me. Is there a way to get the absolute position of the cursor on the canvas? I think if I could get that value it might help me figure out what's going on.


On Jan 6, 2010, at 10:21 AM, Kevin D Smith wrote:


> I'm working on a renderer that needs to handle nested flowables. I essentially want to be able to render something equivalent to the following:

>

> <div>

> <div>

> <span>text</span>

> <div>

> <span>more text</span>

> </div>

> </div>

> </div>

>

> where each div can have its own borders and padding and can break across a page. I've got the page breaking worked out, but drawing on the page is giving me some trouble. I'm not exactly sure where I am on the page when I start drawing. I did some random translations just to get something on the page and I found out that I needed to translate by -380 vertically to get my content in the right place. I also had trouble drawing each piece within a nested div. I'm trying to figure out where I left off on the previously drawn div, but it isn't working as well as I had hoped. If someone can enlighten me on what might be going wrong, I'd appreciate it.

>

> Kevin D Smith

> Kevin.Smith at sixquickrun.com

>

>

>

> _______________________________________________

> reportlab-users mailing list

> reportlab-users at lists2.reportlab.com

> http://two.pairlist.net/mailman/listinfo/reportlab-users


Kevin D Smith
Kevin.Smith at sixquickrun.com





More information about the reportlab-users mailing list