Hi,
I am evaluating the Aspose.word to convert the HTML to Word Document.
Attached htmltoword.zip file has the input xml, styles and the word document created by Aspose.Word.
The below HTML is translated as below in the out put.
<DIV style="DISPLAY: none" id=contactTitle class=short>Contact Name </DIV>
<DIV style="BORDER-BOTTOM: black 1pt solid; BORDER-LEFT: black 1pt solid; PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; BACKGROUND: #d6d6d6; BORDER-TOP: black 1pt solid; BORDER-RIGHT: black 1pt solid; PADDING-TOP: 0cm; mso-shading: windowtext; mso-pattern: solid #D6D6D6; mso-border-alt: solid black .25pt; mso-element: para-border-div">Contact Name </DIV>
Wherein in the HTML the style DISPLAY:none is not displayed.
below is the code used to create the file
string fileName = @"D:\Trials\Aspose\sample files\prb\in1.html";
// Open the stream.
Stream stream = File.OpenRead(fileName);
// Open the document. Note the Document constructor detects HTML format automatically.
// Pass the URI of the base folder so any images with relative URIs in the file can be found.
LoadOptions loadOptions = new LoadOptions();
loadOptions.BaseUri = @"D:\Trials\Aspose\sample files\prb";
loadOptions.LoadFormat = LoadFormat.Html;
Document doc = new Document(stream, loadOptions);
// You can close the stream now, it is no longer needed because the document is in memory.
stream.Close();
// Save in the DOC format.
doc.Save(MyDir + "Document.OpenFromStreamWithBaseUri Out.doc");
Is there a work around for this in ASPOSE?
Please suggest
Thanks for your help.
Best Regards,
Sendhil