To open documents in browser

Hi,

I want to open up a word document in the browser using Aspose.
We are using MVC architecture, asp.net, vb.net technology.
Can you please send us some sample code to do this from vb.net ?

Thanks
Chitra K

Hi Chitra,

Thanks for your inquiry. Aspose.Words for .NET is just a class library and with it you can programmatically generate, modify, convert, render and print documents without utilizing Microsoft Word®. So, it does not offer any UI or web control for performing these document processing tasks on web pages.

Our sister company GroupDocs.com offers a viewer app which you may consider including in your application to view the various file formats. With GroupDocs apps, you can also have limited editing functionalities. For more information, we suggest you please contact GroupDocs support through live chat or support forums of GroupDocs.

Moreover, if you just want to view pages in web browser, you can convert all pages in your Word document to images and then display them. Here is how you can convert pages to images:

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

ImageSaveOptions opts = new ImageSaveOptions(SaveFormat.Png);
opts.PageIndex = 0;
opts.PageCount = doc.PageCount;
opts.PageSavingCallback = new HandlePageSavingCallback();

doc.Save(MyDir + @"16.3.0.png", opts);
private class HandlePageSavingCallback : IPageSavingCallback
{
    public void PageSaving(PageSavingArgs args)
    {
        args.PageFileName = string.Format(MyDir + @"Page_{0}.png", args.PageIndex);
    }
}

Hi Tahir,

Thanks for the reply.
I tried Microsoft.Office.Interop.Word.Application and it worked fine.
Thanks for suggesting GroupDocs.com and we will consider it for our other projects.

Thanks
Chitra Krishnan