我找不到任何選項,即允許在rml
中爲td
設置colspan
元素。這是否有可能?reportlab:在rml中設置td的colspan
5
A
回答
3
正常的ReportLab方法可以做到這一點,而不是使用鴨嘴獸和Table
流動。當您設置Table
的樣式時,您可以指定一個'SPAN'
命令,將任何矩形區域的單元格合併爲一個。您可以在ReportLab User Guide的第7章第81頁找到更多信息。
如果您必須使用RML,我傾向於認爲colspan根本不可用。至少不在ReportLab RML reference document。相反,我認爲你應該使用blockSpan
元素。沒有給出的例子,但你會發現它在the RML manual。
8
戈登對元素的建議爲我工作。這裏有一個如何使用它的一個例子:
<?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>
+0
最有用的解決方案,需要了解
相關問題
- 1. 在HR休息時設置類TD colspan
- 2. reportlab設置左表位置
- 3. Python Reportlab RML。如何在兩頁上拆分表格行
- 4. 如何在td爲空時使colspan auto?
- 5. Vaadin表| |如何設置colspan
- 6. 動態設置colspan jquery
- 7. 用jQuery動態設置colspan
- 8. 如何處理其colspan ==''的td標籤?
- 9. 將基本HTML轉換爲RML(Reportlab標記語言)
- 10. 如何在c#中動態改變td的colspan?
- 11. vba代碼從td rowspan&td colspan使用硒firefox
- 12. 如何在reportlab中設置python中的任何字體?
- 13. 在基於代碼的數據表列設置中使用colspan
- 14. 設置HTML td的寬度與td中的圖像相同
- 15. Colspan屬性沒有從變量設置
- 16. Colspan不適用於寬度設置? (IE7)
- 17. Python ReportLab設置背景顏色
- 18. 如何在android gridview單元格中設置colspan
- 19. ASP.NET WebForms - 如何在GridView中爲標題行設置colspan?
- 20. 如何在JSF panelGrid中設置colspan和rowspan?
- 21. 有沒有辦法在Reportlab中設置字體大小?
- 22. 設置HTML表格TD
- 23. 與colspan連接的表格數據的中心文本=「2」與.css「選擇具有屬性colspan =」2「的td」
- 24. 如何在div中設置p標籤,在td標籤中設置div標籤
- 25. 設置td背景顏色在jQuery中當知道td id的時候
- 26. reportlab保存位置
- 27. rml of Openerp中的報告
- 28. 如何在RML中配置分頁符的列數?
- 29. XSLT中的Colspan
- 30. 在ReportLab的
不是那麼完美方針破解的解決方案爲唐柯比提到 – 2017-05-18 08:52:02