/// <summary> /// Returns a OpenXMl paragraph representing formatted listItem. /// </summary> /// <param name="item">listItem object</param> /// <param name="numStyleId">style id to use</param> /// <returns></returns> private static Paragraph GetListItem(Model.ListItem item, int numStyleId) { Paragraph listItemPara = new Paragraph(); ParagraphProperties paraProps = new ParagraphProperties(); NumberingProperties numberingProps = new NumberingProperties(); NumberingLevelReference numberingLevelReference = new NumberingLevelReference() { Val = 0 }; NumberingId numberingId = new NumberingId() { Val = numStyleId }; numberingProps.Append(numberingLevelReference); numberingProps.Append(numberingId); paraProps.Append(numberingProps); Run listRun = new Run(); Text listItemText = new Text() { Text = item.Body }; listRun.Append(listItemText); listItemPara.Append(paraProps); listItemPara.Append(listRun); return listItemPara; }
public static IT.Chunk GetFormattedText(Text text) { IT.Chunk formattedChuck = new IT.Chunk(text.TextContent); formattedChuck.Font = GetFormattedFont(text.Font); return formattedChuck; }
public static OpenXmlElement GetFormattedElement(Model.Text text) { Text docText = new Text(text.TextContent); Run run = new Run(); RunProperties runProp = CreateRun(text); if (runProp != null) run.Append(runProp); run.Append(docText); return run; }
private static IT.IElement GetElement(Text text) { Paragraph para = new Paragraph(text); IT.Paragraph formatted = ParagraphFormatter.GetFormattedParagraph(para); return formatted; }
public Paragraph(Text[] parts) { contents = new List<Element>(parts); }
public Paragraph(Text text) : this() { contents.Add(text); }
public void AddPart(Text part) { contents.Add(part); }
private void AddElement(Text text, PDF.MultiColumnText columns) { Paragraph para = new Paragraph(text); IT.Paragraph formatted = ParagraphFormatter.GetFormattedParagraph(para); AddToDocument(formatted, columns); }
public void AddElement(Text text) { elements.Add(text); }
public TableCell(Text text) : this() { elements.Add(text); }