FOP - 防止块倒塌
问题描述:
我想显示在PDF中tickbox并试图做到这一点的:FOP - 防止块倒塌
<fo:table-row height="10pt">
<fo:table-cell>
<fo:block line-height="10pt" text-align="center" border-style="solid" border="1pt" white-space-collapse="false">
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block/>
</fo:table-cell>
</fo:table-row>
而是获得一个盒子,我得到一个线即框宽度1点的高度。 我如何强制FOP,而不是崩溃块?我使用Apache的Fop的1.0
UPDATE1:
这工作:
<fo:block text-align="left">
<fo:table text-align="left" table-layout="fixed">
<fo:table-column column-width="10pt"/>
<fo:table-column column-width="10pt"/>
<fo:table-body>
<fo:table-row height="10pt">
<fo:table-cell height="10pt">
<fo:block line-height="10pt" font-family="$_Fontfamily"
font-size="8pt">$row.getValue().get(0)
</fo:block>
</fo:table-cell>
<fo:table-cell height="10pt" width="10pt">
<fo:block text-align="center" border-style="solid" border="1pt"/>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:block>
我想在第二单元格边框。 如果我把表格插入第二块,然后它工作正常。
答
尝试:
<fo:table-row>
<fo:table-cell height="10pt" width="10pt">
<fo:block text-align="center" border-style="solid" border="1pt"/>
</fo:table-cell>
<fo:table-cell height="10pt">
<fo:block/>
</fo:table-cell>
</fo:table-row>
这是它产生两个细胞与给定的测量一个现实世界的例子
<fo:table border="1pt solid black" width="18.5cm" table-layout="fixed">
<fo:table-body>
<fo:table-row>
<fo:table-cell height="20.0cm" width="16.3cm" border-right="1pt solid black">
<fo:block/>
</fo:table-cell>
<fo:table-cell height="20.0cm">
<fo:block/>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
遗憾的是它并没有:-(帮助 – HamoriZ 2011-03-24 13:24:14
由于我不知道你的表虽然我们使用0.95 – 2011-03-24 13:30:31
谢谢,如果我在表格中加入一个表格,但我想用一个简单的结构来解决这个问题 – HamoriZ 2011-03-24 13:54:01