Converting html to Word

Hi Team,

I am converting html to word file.i.e taking html input and creating word file using aspose.The word file is then edited for bullets position and spacing using aspose again.

Is there any possibility that during the convertion from html to Word ,I will edit the html file directly using aspose?

Appreciate for soon reply.

Thanks

Regards
Sonam

Hi Team,
Kindly update on this.

Thanks
Sonam

Hi Sonam,

Thanks for your inquiry. Yes, you achieve your requirements using Aspose.Words. Once you have loaded your html document into Aspose.Words DOM, you can edit the loaded html document before saving your final document. Please check the following code example for your kind reference.

Document doc = new Document(MyDir + "in.htm");

for (Paragraph para : (Iterable<Paragraph>)doc.getChildNodes(NodeType.PARAGRAPH, true))
{
    if (para.isListItem())
    {
        para.getListFormat().getListLevel().setTabPosition(0.0);
        para.getListFormat().getListLevel().setNumberPosition(0);
        para.getParagraphFormat().setFirstLineIndent(10.0);
        para.getParagraphFormat().setFirstLineIndent(-10.0);
    }
}
doc.save(MyDir + "Out.docx");

Could you please attach your input HTML along with expected output document here for our reference? We will then provide you more information about your query along with code.

Thanks Tahir,

Regards
Sonam