我正在使用文本框内的段落,以使文本方向向上显示。这几乎是我希望的方式,我得到的最后一个问题是文本似乎是左对齐的,我尝试将段落对齐设置为居中。这没有任何影响,也看不到使用文本框进行此操作的选项。输出的文本不会每次都相同。
这就是我目前拥有的
这就是我想要实现的
下面是我使用MigraDoc实现的代码
for (int i = 0; i < section2Items.Length; i++)
{
TextFrame colXTextFrame = bothSection2ItemHeadersRow.Cells[i + 1].AddTextFrame();
colXTextFrame.Orientation = TextOrientation.Upward;
colXTextFrame.Height = new Unit(140);
Paragraph colXParagraph = new Paragraph();
colXParagraph.Format.Alignment = ParagraphAlignment.Center;
colXParagraph.AddText(section2Items[i].Section2ItemTitle);
colXTextFrame.Add(colXParagraph);
bothSection2ItemHeadersRow.Cells[i + 1].Borders.Bottom = new Border() { Color = new MigraDoc.DocumentObjectModel.Color(255, 255, 255), Width = new MigraDoc.DocumentObjectModel.Unit(0), Style = MigraDoc.DocumentObjectModel.BorderStyle.None };
}