MigraDoc不会将内容与右侧对齐

时间:2018-04-12 16:39:20

标签: migradoc

这是代码。该列右对齐,单元格右对齐,段落右对齐,但当表格添加到headers.primary时,内容打印左对齐。还有什么我需要做的?

        Table table = new Table();
        table.Borders.Width = 0;
        Column Column1 = table.AddColumn(Unit.FromInch(2.5));
        Column Column2 = table.AddColumn(Unit.FromInch(4));
        Column Column3 = table.AddColumn(Unit.FromInch(3.5));
        Column3.Format.Alignment = ParagraphAlignment.Right;
        Row Row1 = table.AddRow();
        Cell Row1Col3 = Row1.Cells[2];
        Row1Col3.Format.Alignment = ParagraphAlignment.Right;
        Paragraph ConfidentialParagraph = new Paragraph();
        ConfidentialParagraph.Format.Font.Size = Unit.FromPoint(8.25);
        ConfidentialParagraph.Format.Alignment = ParagraphAlignment.Right;
        ConfidentialParagraph.AddText("IPG Confidential Green: Printed at " + DateTime.Now.ToShortDateString() + " " + DateTime.Now.ToLongTimeString());
        Row1Col3.Add(ConfidentialParagraph);

0 个答案:

没有答案