private ListContent CreateList(ListType listType) { ListContent list = new ListContent() { ListType = listType }; for (int i = 0; i < 5; i++) { List <IContentEntity> itemList = new List <IContentEntity>(); ParagraphContent content = new ParagraphContent(); for (int j = 0; j < 5; j++) { content.Content.Add(new ContentText() { Content = "列表项" + j, Font = j % 2 == 1 ? font : fontYellow }); } content.Content.Add(new ContentText() { Content = i.ToString(), Font = i % 2 == 1 ? font : fontYellow }); itemList.Add(content); list.Content.Add(itemList); } return(list); }
public void Convert(HtmlAgilityPack.HtmlNode node, System.Xml.XmlWriter writer) { using (writer.StartElement("p")) { writer.WriteAttributeString("content-type", "2.2 Story Sub-head 3"); var innerContent = new ParagraphContent(); innerContent.Convert(node, writer); } }
public void Convert(HtmlNode node, XmlWriter writer) { using (writer.StartElement("caption")) { using (writer.StartElement("title")) { var innerContent = new ParagraphContent(); innerContent.Convert(node, writer); } } }
public void Convert(HtmlNode node, XmlWriter writer) { using (writer.StartElement("disp-quote")) { using (writer.StartElement("p")) { writer.WriteAttributeString("content-type", "2.3 Quote box"); var innerContent = new ParagraphContent(); innerContent.Convert(node, writer); } } }
protected override void WriteDocument(Document document) { document.Write(new ContentString { Content = "示例pdf文件生成,我的颜色是黄色", Font = fontYellow }); document.Write(new ContentString { Content = "示例pdf文件生成,我的颜色是绿色", Font = fontGreen }); document.Write(new NewLineContent { Count = 5 }); document.Write(new ContentString { Content = "文本段落示例:", Font = font }); ParagraphContent paragraphContent = new ParagraphContent(); paragraphContent.Content.Add(new ContentString { Content = text, Font = fontGreen }); paragraphContent.Content.Add(new NewLineContent { Count = 1 }); paragraphContent.Content.Add(new PictureContent { Content = File.ReadAllBytes("E:\\1.jpg"), Width = 500 }); // paragraphContent.Content.Add(new ContentString { Content = contetText, Font = font }); paragraphContent.Content.Add(new ContentString { Content = text, Font = fontYellow }); paragraphContent.Content.Add(new NewLineContent { Count = 1 }); paragraphContent.Content.Add(new PictureContent { Content = File.ReadAllBytes("E:\\2.jpg"), Width = 500 }); //paragraphContent.Content.Add(new ContentString { Content = contetText.Replace("\n", ""), Font = font }); document.Write(paragraphContent); //AddList(document); AddTable(document); }
public void LoadParagraphContent() { ParagraphContent paragraph = new ParagraphContent(); Brief_Content_Paragraph.Text = paragraph.Projects_Brief_Paragraph; }
public void LoadParagraphContent() { ParagraphContent content = new ParagraphContent(); About_Interests_Content.Text = content.About_Interests_Paragraph; }