After adding a table to a document, I am add a paragraph.how can I set the font size for this paragraph?
private Document _doc;
private Table tableNode;
using (MemoryStream ms = new MemoryStream(ScenarioResources.Prepaid_Minute_Plan_Template))
{
Document templateDoc = new Document(ms, new LoadOptions { LoadFormat = LoadFormat.Docx });
Table sourceTable = GetSourceTable(templateDoc.LastSection.Body);
NodeImporter importer = new NodeImporter(templateDoc, _doc, ImportFormatMode.KeepSourceFormatting);
Section lastSection = _doc.LastSection;
tableNode = importer.ImportNode(sourceTable, true) as Table;
if (tableNode != null)
{
Row headerRow0 = tableNode.Rows[0].Clone(true) as Row;
Row headerRow1 = tableNode.Rows[1].Clone(true) as Row;
Row headerRow2 = tableNode.Rows[2].Clone(true) as Row;
Row itemRow = tableNode.Rows[3].Clone(true) as Row;
tableNode.Rows.Clear();
tableNode.Rows.Add(headerRow0);
tableNode.Rows.Add(headerRow1);
tableNode.Rows.Add(headerRow2);
lastSection.Body.AppendChild(tableNode);
string definition = "This has to be *BOLD*";
Paragraph paragraph = new Paragraph(_doc);
paragraph.AppendChild(new Run(_doc, definition));
lastSection.Body.AppendChild(paragraph);
lastSection.Body.AppendChild(new Paragraph(_doc));
}
Also how can I set part of the text in the paragraph to bold?