-1

I have the below style defined in xslt( which is used just to provide template) but as you can see the font is not bold it's just normal font.

also i would like to know how to add cellspacing

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

the highlighted one's should be bold and i want something like the below image enter image description here Code for Table:

      <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>
Maqsood
  • 369
  • 4
  • 17
  • i guess Migradoc doesnot know the bold font for "Helvetica World". I change the font name to Calibri and it working fine. However i am still facing problem in adding cell spacing as i don't know which tag i should use for it – Maqsood Nov 29 '16 at 12:06
  • could you provide some code of how you set up the table? – Mong Zhu Nov 29 '16 at 12:09
  • @MongZhu i have updated the description – Maqsood Nov 29 '16 at 12:15
  • I am not sure whether my answer can help you. I never used Migradoc this way. Sorry – Mong Zhu Nov 29 '16 at 12:21
  • 1
    MigraDoc does not use XSLT. You use a tool that converts XSLT to MigraDoc, but you do not give us any information about this tool. Refer to the manual for that secret tool or contact their support. – I liked the old Stack Overflow Nov 29 '16 at 13:00

1 Answers1

0

I don't know how you exactly set up the table, But there are several methods to get the linespacing as desired.

1) If every entry sits on its own row, you could use the BottomPadding or the TopPadding property:

Table table = new Table();
Row row = table.AddRow();
row.BottomPadding = 5;
row.TopPadding = 5;

2) If you have a paragraph with multiple lines you could use the LineSpacing property:

Paragraph par = row.Cells[0].AddParagraph("Stuff");
par.Format.LineSpacing = Unit.FromMillimeter(3);
Mong Zhu
  • 23,309
  • 10
  • 44
  • 76