colspan
のtd
要素を設定できるオプションが見つかりませんrml
。それはどういうわけか可能ですか?
5897 次
2 に答える
8
要素のゴードンの提案はblockSpan
私のために働いた。使用方法の例を次に示します。
<?xml version="1.0"?>
<document filename="test.pdf">
<template pageSize="(612,792)" title="Test" author="Don Kirkby">
<pageTemplate id="first">
<frame id="first" x1="10.0" y1="10.0" width="592" height="772"/>
</pageTemplate>
</template>
<stylesheet>
<blockTableStyle id="main">
<blockSpan start="0,1" stop="1,1"/>
</blockTableStyle>
</stylesheet>
<images/>
<story>
<blockTable colWidths="100.0,287.5,187.5" style="main">
<tr>
<td><para>Cell 0,0</para></td>
<td><para>Cell 1,0</para></td>
<td><para>Cell 2,0</para></td>
</tr>
<tr>
<td><para>Cell 0,1 will flow into its neighbour</para></td>
<td><para>Cell 1,1 will not appear, but must be present</para></td>
<td><para>Cell 2,1</para></td>
</tr>
<tr>
<td><para>Cell 0,2</para></td>
<td><para>Cell 1,2</para></td>
<td><para>Cell 2,2</para></td>
</tr>
</blockTable>
</story>
</document>
于 2011-12-02T19:39:32.393 に答える
3
これを行う ReportLab の通常の方法は、代わりに Platypus とフロー可能オブジェクトを使用することTable
です。のスタイルを設定するときに、セルの任意の長方形領域を 1 つにまとめるコマンドをTable
指定できます。'SPAN'
詳細については、ReportLab ユーザー ガイドの第 7 章、81 ページを参照してください。
RML を使用する必要がある場合、colspan は使用できないと考えがちです。少なくとも、ReportLab RML リファレンス ドキュメントには記載されていません。blockSpan
代わりに、要素を使用することになっていると思います。例はありませんが、RML マニュアルに記載されています。
于 2011-02-16T12:43:31.930 に答える