Hello there,
I am inserting some text in a document at run-time by creating a new node of type Run as:
string imageText = GetImageText(ref builder);
Table objTable = new Table(builder.Document);
objTable.Rows.Add(new Row(builder.Document));
builder.CurrentParagraph.ParentNode.InsertAfter(objTable, builder.CurrentParagraph);
Cell objCell = new Cell(builder.Document);
PageSetup objPageSetup = builder.Document.Sections[0].PageSetup;
objCell.CellFormat.Width = objPageSetup.PageWidth - objPageSetup.LeftMargin - objPageSetup.RightMargin;
objCell.EnsureMinimum();
objTable.Rows[0].Cells.Add(objCell);
builder.MoveTo(objCell.ChildNodes[0]);
objShape = builder.InsertImage(objImage);
builder.InsertNode(new Run(builder.Document.Document, imageText));
But in the output document(attached), this new node text is formatted differently as compared to the document. (You will see this text on the left side of middle image.)
How can I insert it with formatting in line with the current document?
Thank you!
Thank you!