在migradoc

时间:2016-11-29 11:59:31

标签: c# xslt pdfsharp migradoc

我在xslt中定义了以下样式(仅用于提供模板),但正如您所看到的那样,字体不是粗体,它只是普通字体。

我也想知道如何添加cellspacing

    <Font Color="0xFF001230" Name="Helvetica World" Size="9pt" Bold="true"/>

the highlighted one's should be bold 我想要像下面的图像 enter image description here 表格代码:

      <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>

1 个答案:

答案 0 :(得分:0)

我不知道你是如何准确设置表的,但有几种方法可以根据需要获得行间距。

1)如果每个条目都在自己的行上,您可以使用BottomPaddingTopPadding属性:

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);