[reportlab-users] positionate flowable in frame ?!

Tamer Higazi th982a at googlemail.com
Thu Mar 27 13:29:24 EDT 2014


dear Andy!
Thank you very much.

Now I start to get the concept.



Tamer



Am 27.03.2014 10:08, schrieb Andy Robinson:

> Hi Tamer,

>

> Some basic concepts:

>

> You don't precisely position things in a frame. If you want to

> precisely position something (e.g. a table), then call wrap() to get

> its size, and draw() to place it exactly where YOU want on the canvas.

>

> Frames are supposed to consume from a list of content, moving

> downwards automatically, and onto the next page, like a word

> processor. The frame, not you, decides where to position your

> flowables. Usually, just below the previous flowable.

>

> Now for the details: paragraphs are usually the full width of the

> frame, so horizontal alignment of "the whole object" does not apply.

> But for something with a smaller width, like a table, all flowables

> have a property hAlign. Tables also have a property 'colWidths'. so

> you can do

>

> myTable.colWidths = [100,50,50,50] #units in points

> myTable.hAlign = 'CENTER' #or 'LEFT' or 'RIGHT'

>

> and it will be positioned accordingly.

>

>

> You will also find it very helpful to read the RML examples and user

> guide on our site. It's a commercial product but the XML tags

> correspond pretty much one-for-one to the underlying Python objects,

> and it's well documented and full of visual examples, so you can see a

> style you like and guess with 90% accuracy what Python properties you

> need.

> https://www.reportlab.com/software/documentation/

>

> I hope this helps,

>

>

> Andy

>



More information about the reportlab-users mailing list