我在xslt中定义了以下样式(仅用于提供模板),但正如您所看到的那样,字体不是粗体,它只是普通字体。
我也想知道如何添加cellspacing
<Font Color="0xFF001230" Name="Helvetica World" Size="9pt" Bold="true"/>
<Column Width="5mm" Padding="10mm" Spacing="10mm"/>
<Column Width="130mm" Padding="10mm" Spacing="10mm">
<Borders Visible="true" Color="0xFFe2e2e2" Distance="10mmm" >
</Borders>
</Column>
<Column Width="70mm"/>
<Column Width="5mm">
<Borders Visible="false" Color="0xFFe2e2e2">
</Borders>
</Column>
<Row>
<Cell>
</Cell>
<Cell>
<GenericText Id="BasisInfo"/>
</Cell>
<Cell>
</Cell>
<Cell>
</Cell>
</Row>
</Table>
答案 0 :(得分:0)
我不知道你是如何准确设置表的,但有几种方法可以根据需要获得行间距。
1)如果每个条目都在自己的行上,您可以使用BottomPadding
或TopPadding
属性:
Table table = new Table();
Row row = table.AddRow();
row.BottomPadding = 5;
row.TopPadding = 5;
2)如果你有一个包含多行的段落,你可以使用LineSpacing
属性:
Paragraph par = row.Cells[0].AddParagraph("Stuff");
par.Format.LineSpacing = Unit.FromMillimeter(3);