Thanks for your reply.
Still I am facing problem with table break .I change my Input Html body(pls check in attachment) as well as my code below:
public static MemoryStream ConvertToDoc(string headerHtml, string bodyHtmlString, string footerHtmlString)
{
MemoryStream wordStream;
License license = new License();
//string reportFile = string.Concat( “Aspose.Total.lic”);
string reportFile = ConfigurationManager.AppSettings[“WordLicencePath”];
license.SetLicense(reportFile);
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
PageSetup ps = builder.PageSetup;
ps.PageWidth = 800;
ps.RestartPageNumbering = true;
builder.MoveToHeaderFooter(HeaderFooterType.HeaderPrimary);
builder.InsertHtml(headerHtml);
builder.MoveToHeaderFooter(HeaderFooterType.FooterPrimary);
// footerHtmlString = footerHtmlString + "Page: ($p of $P ) “;
builder.InsertHtml(footerHtmlString);
// Add fields for current page number
builder.InsertField(“PAGE”, “”);
// Add any custom text
builder.Write(” / ");
// Add field for total page numbers in document
builder.InsertField(“NUMPAGES”, “”);
// Move back to the main story of the first section.
builder.MoveToDocumentStart();
builder.InsertHtml(bodyHtmlString);
foreach (Table table in doc.GetChildNodes(NodeType.Table, true))
foreach (Cell cell in table.GetChildNodes(NodeType.Cell, true))<o:p></o:p>
{<o:p></o:p>
//call this method if table’s cell is created on the fly<o:p></o:p>
//newly created cell does not have paragraph inside<o:p></o:p>
cell.EnsureMinimum();<o:p></o:p>
foreach (Paragraph para in cell.Paragraphs)<o:p></o:p>
if (!(cell.ParentRow.IsLastRow && para.IsEndOfCell))<o:p></o:p>
para.ParagraphFormat.KeepWithNext = true;<o:p></o:p>
}
wordStream = new MemoryStream();
builder.Document.Save(wordStream, SaveFormat.Doc);
return wordStream;
}
change Input Htmlbodyhtml and output.doc as an attachment .Please suggest me may I have do some modification in code or html file.