/// <summary> /// Creates paragraph in the Word document. /// </summary> /// <param name="section">The section to add paragraphs.</param> private void CreateParagraph(WSection section) { #region Inserting Header IWParagraph paragraph = section.HeadersFooters.Header.AddParagraph(); //Gets the image. string resourcePath = "syncfusion.dociodemos.winui.Assets.DocIO.HeaderImage.png"; Stream imageStream = assembly.GetManifestResourceStream(resourcePath); //Appends image to the paragraph. WPicture picture = paragraph.AppendPicture(imageStream) as WPicture; picture.WidthScale = 173f; picture.HeightScale = 149f; #endregion #region Inserting Footer paragraph = section.HeadersFooters.Footer.AddParagraph(); paragraph.ParagraphFormat.Tabs.AddTab(523f, TabJustification.Right, TabLeader.NoLeader); //Adds page and Number of pages field to the document. paragraph.AppendText("\tPage "); paragraph.AppendField("Page", FieldType.FieldPage); paragraph.AppendText(" of "); paragraph.AppendField("NumPages", FieldType.FieldNumPages); #endregion //Appends paragraph. paragraph = section.AddParagraph(); paragraph.ApplyStyle("Heading 1"); paragraph.ParagraphFormat.HorizontalAlignment = Syncfusion.DocIO.DLS.HorizontalAlignment.Center; WTextRange textRange = paragraph.AppendText("Adventure Works Cycles") as WTextRange; textRange.CharacterFormat.FontSize = 18f; textRange.CharacterFormat.FontName = "Calibri"; //Appends paragraph. paragraph = section.AddParagraph(); paragraph.ParagraphFormat.FirstLineIndent = 36; paragraph.BreakCharacterFormat.FontSize = 12f; textRange = paragraph.AppendText("Adventure Works Cycles, the fictitious company on which the Adventure Works sample databases are based, is a large, multinational manufacturing company. The company manufactures and sells metal and composite bicycles to North American, European and Asian commercial markets. While its base operation is located in Bothell, Washington with 290 employees, several regional sales teams are located throughout their market base.") as WTextRange; textRange.CharacterFormat.FontSize = 12f; paragraph = section.AddParagraph(); paragraph.ParagraphFormat.FirstLineIndent = 36; paragraph.BreakCharacterFormat.FontSize = 12f; textRange = paragraph.AppendText("In 2000, Adventure Works Cycles bought a small manufacturing plant, Importadores Neptuno, located in Mexico. Importadores Neptuno manufactures several critical subcomponents for the Adventure Works Cycles product line. These subcomponents are shipped to the Bothell location for final product assembly. In 2001, Importadores Neptuno, became the sole manufacturer and distributor of the touring bicycle product group.") as WTextRange; textRange.CharacterFormat.FontSize = 12f; paragraph = section.AddParagraph(); paragraph.ApplyStyle("Heading 1"); paragraph.ParagraphFormat.HorizontalAlignment = Syncfusion.DocIO.DLS.HorizontalAlignment.Left; textRange = paragraph.AppendText("Product Overview") as WTextRange; textRange.CharacterFormat.FontSize = 16f; textRange.CharacterFormat.FontName = "Calibri"; }