Hi There,
Actually i want to convert my html file to word file and html file contains css display:inline property which is not working in my word file but working well in html. So as you said that display:inline is supported in aspose.word than why not it works correctly. Please investigate this issue and reply me asap.
here is my details;
Input: html file
Output: word file
ScreenShots: You can compare original html with generated word screenshots
and here is my code related to conversion by using aspose.word.
string htmlfilepath = @“test.html”;
string res = ReadFileString(htmlfilepath);
Aspose.Words.Document doc = new Aspose.Words.Document();
DocumentBuilder builder = new DocumentBuilder(doc);
foreach (Aspose.Words.Section section in doc)
{
section.PageSetup.Orientation = Aspose.Words.Orientation.Portrait;
section.PageSetup.LeftMargin = 15;
section.PageSetup.RightMargin = 15;
section.PageSetup.HeaderDistance = 15;
section.PageSetup.FooterDistance = 15;
}
builder.InsertHtml(res);
MemoryStream outStream = new MemoryStream();
doc.Save(outStream, SaveFormat.Doc);
byte[] docArray = outStream.ToArray();
Response.AddHeader(“Content-Type”, “application/doc”);
Response.AddHeader(“Content-Disposition”, String.Format(“attachment; filename=Testdoc.doc; size={0}”, docArray.Length.ToString()));
Response.BinaryWrite(docArray);
Response.End();