简体   繁体   English

如何将部分区域中的表格与 PDFsharp 或 MigraDoc 对齐?

[英]How do I align a table in the section area with PDFsharp or MigraDoc?

How do I align a table in the section area?如何在截面区域中对齐表格?

MigraDoc.DocumentObjectModel.Tables.Table tFirma = section.Footers.Primary.AddTable();
MigraDoc.DocumentObjectModel.Tables.Column cFirma = tFirma.AddColumn(MigraDoc.DocumentObjectModel.Unit.FromCentimeter(3));//Tamaño de la coluna
MigraDoc.DocumentObjectModel.Tables.Row rFirma = tFirma.AddRow();
rFirma.Cells[0].Format.Alignment = MigraDoc.DocumentObjectModel.ParagraphAlignment.Center;
rFirma.Cells[0].AddParagraph("Employee Signature");

您可以设置tFirma.Rows.LeftIndent以水平缩进表格。

要将表格居中放置在某个部分的中心,请使用以下行:

table.Rows.Alignment = RowAlignment.Center;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM