How can i controll line spacing between contents on Aspose word document.See the sample code as well as sample document below.
In the sample attachment we want to coontrol line spacing between content show in highlighted yellow.
See the sample code we are using and see the red section.This string builder is using doeumentbuilder object.
private string GetPracticeHtml(List FolderContentList)
{
StringBuilder strPartice = new StringBuilder();
int i = 0;
if (FolderContentList != null && FolderContentList.Count > 0)
{
strPartice.Append("<h6 style=‘margin:0px 0px 0px 0px;padding:0px 0px 0px 0px’><span style=‘font-size:11px;font-family:arial’>Practice Area</span></h6>");
foreach (FolderContent foldContent in FolderContentList)
{
EktronHelper.SortList<Wilmerhale.Common.Content>(foldContent.ContentList, "ContentTitle", SortDirection.Ascending);
foreach (Wilmerhale.Common.Content content in foldContent.ContentList)
{
i += 1;
// strPartice.Append("<a class=‘dl-hide’ id=‘hs-" + i + "’ href=’" + content.Link + "’>" + content.ContentTitle + "</a>");
strPartice.Append("<h6 style=‘margin:0px 0px 0px 0px;padding:0px 0px 0px 0px’><span STYLE=‘font-family:Arial;font-style:bold;font-size:11px;’>");
strPartice.Append(content.ContentTitle); //— Need to control line spacing here.
strPartice.Append("</span></h6>");
// strPartice.Append("<br/>");
// strPartice.Append("<ul style=‘list-style:none; margin:0 0 10px 0’>");
// strPartice.Append("<div style='font-size:10px;font-family:Arial;margin:0 0 0 0>");
FolderContent folderContent = foldContent.FolderList.Find(delegate (FolderContent fContent) { return fContent.FolderID == content.ChildFolderID; });
if (folderContent != null)
{
strPartice.Append(GetContentHtml(folderContent, ref strPartice, 1));
}
// strPartice.Append("</div>");
// strPartice.Append("</ul>");
}
}
}
return strPartice.ToString();
}