Hello,
I can't figure out how to insert some vertical text, to be on a side of a document. Could you please provide me a short example?
Thank you very much.
Document document = new Document();
Table table = document.AddSection ().AddTable();
table.ResetCells(1,1);
TableCell cell = table.Rows[0].Cells[0];
table.Rows[0].Height =150;
cell.AddParagraph().AppendText("Hello,world: vertical style");
cell.CellFormat.TextDirection = TextDirection.RightToLeftRotated;
document.SaveToFile("sample.docx",FileFormat.Docx );
Document document = new Document("Word.doc");
Table table = document.Sections[0].AddTable();
table.ResetCells(1, 1);
TableCell cell = table.Rows[0].Cells[0];
table.Rows[0].Height = 150;
table.Rows[0].Cells[0].Width = 10;
cell.CellFormat.TextDirection = TextDirection.RightToLeftRotated;
cell.AddParagraph().AppendText("Hello,world: vertical style");
table.TableFormat.WrapTextAround = true;
table.TableFormat.Positioning.VertRelationTo = VerticalRelation.Page;
table.TableFormat.Positioning.HorizRelationTo = HorizontalRelation.Page;
table.TableFormat.Positioning.HorizPosition = document.Sections[0].PageSetup.PageSize.Width - table.Width;
table.TableFormat.Positioning.VertPosition = 200;
document.SaveToFile("sample.docx", FileFormat.Docx);