Word document to HTML

Hi,

Can Aspose.Word convert the section of word document direct to html instead of creating the html document?
We have some numbers of sections in the word document which we are separating by the paragraph and converting to html docs. Trail version is not supporting, counting the bookmarks with some images and some complex styles so will real version supports such a book marks?
How can we manipulate with the images in this case i.e. how can we place these images to some physical location?
Thanks and Regards,
Milind Sable

Hi Milind,
Thanks for your interest in Aspose.Words. It’s difficult to suggest you anything without having a look into your document. Could you please share the sample input document and desired output? So we check and suggest you accordingly.
Please note sharing document here are quite safe. As only the thread owner and the Aspose Staff has access to the attachments.
Please feel free to contact us for any other assistance.
Best Regards,

Hi
Milind,

Thanks for your inquiry.

Milind:
Can Aspose.Word convert the section of word document direct to html instead of creating the html document?

Sure, you can try using the following code snippet to be able to get HTML string representation of Document Section:

Document doc = new
Document(@"C:\test\MultiSecDocument.docx");
Section sec = doc.FirstSection;
DocumentBuilder builder = new DocumentBuilder();
builder.Document.RemoveAllChildren();
NodeImporter importer = new NodeImporter(doc, builder.Document, ImportFormatMode.KeepSourceFormatting);
Node tempSec = importer.ImportNode(sec, true);
builder.Document.AppendChild(tempSec);
string html = string.Empty;
using (MemoryStream htmlStream = new MemoryStream())
{
    builder.Document.Save(htmlStream, SaveFormat.Html);
    html = Encoding.UTF8.GetString(htmlStream.GetBuffer(), 0, (int)htmlStream.Length);
}
// There could be BOM at the beggining of the string.
// We should remove it from the string.
while (html[0] != '<')
    html = html.Substring(1);
Console.Write(html);

Secondly, the evaluation version of Aspose.Words (without a license specified) provides full product functionality, but it inserts an evaluation watermark at the top of the document on open and save, and limits the maximum document size to several hundred paragraphs.

If you want to test Aspose.Words without the evaluation version limitations, you can also request a 30-day Temporary License. Please refer to How to get a Temporary License?

Moreover, I would suggest you please read the following article on Extracting Images from a Document:
https://docs.aspose.com/words/net/working-with-images/

Please let me know if I can be of any further assistance.

Best Regards,