Specifies the alignment of the current table with respect to the text margins in the current section.
Name | Type | Description |
sJcType | "left" | "right" | "center" | The alignment type used for the current table placement. |
builder.CreateFile("docx"); var oDocument = Api.GetDocument(); var oParagraph = oDocument.GetElement(0); oParagraph.AddText("The table is aligned at the center of the page horizontally."); var oTableStyle = oDocument.CreateStyle("CustomTableStyle", "table"); oTableStyle.SetBasedOn(oDocument.GetStyle("Bordered")); var oTable = Api.CreateTable(2, 2); oTable.SetWidth("percent", 50); oTable.SetStyle(oTableStyle); oTable.SetJc("center"); oDocument.Push(oTable); builder.SaveFile("docx", "SetJc.docx"); builder.CloseFile();