[reportlab-users] table border bottom draw on split

Damian Moore damian at reportlab.com
Fri Mar 13 11:48:10 EDT 2009


Hi Arkadi,

We have a magic coordinate for doing what you describe called
'splitlast'. An example of this can be seen on page 8 of the rml2pdf
test_008_tables.pdf. You use this in the start and stop attributes of
the line style as so:

<lineStyle kind="LINEBELOW" colorName="#000000" thickness="2"
start="0,splitlast" stop="-1,splitlast"/>

We recently discovered a side-effect bug in this code which draws an
extra line at the top of the continuing table on the next page. If this
affects you, a work-around is to use the <pto> (Please Turn Over) and
<pto_trailer> tag to add extra elements where table breaks.

The example below adds a short table with the same width and styles as
the split one. Borders are draw on the left, right and bottom edges to
gain some extra white space before the bottom line. You would wrap your
long table like so:

<pto>
<pto_trailer>
<blockTable colWidths="9in" style="default">
<blockTableStyle id="x" parent="default">
<lineStyle kind="LINEBELOW" colorName="#AAAAAA"
thickness="2"/>
<lineStyle kind="LINEBEFORE" colorName="#AAAAAA"
thickness="2"/>
<lineStyle kind="LINEAFTER" colorName="#AAAAAA"
thickness="2"/>
<blockBackground colorName="#CCCCFF" />
<blockFont name="Times-Bold" size="5" />
</blockTableStyle>
<tr><td></td></tr>
</blockTable>
</pto_trailer>
<-- Your existing long table -->
</pto>

You can read more about the features of PTO in rml2pdf's test_025_pto.

Regards,
Damian


Arkadi Colson wrote:

> Hi all,

>

>

> I have a table with several rows, to many in fact to fit on 1 page.

> For the first row on page 1 I draw LINEABOVE, for the last row (on

> page 2) I draw LINEBELOW and for the rest between LINEAFTER and

> LINEBEFORE is called. This way I have a box around the rows. However

> on the page split I want to have the LINEBELOW also instead of an open

> table. Is this possible somehow?

>

> Or do I have to create a table in a table with BOX set and will the

> split function draw the LINEBELOW in that case?

>

> Can somebody advice me on that?

>

>

> Thanks and best regards,

> Arkadi Colson

>

> _______________________________________________

> reportlab-users mailing list

> reportlab-users at reportlab.com

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




More information about the reportlab-users mailing list