0

I have an application where I can upload and download files (most of then are .docx or .doc). Instead of downloading the files I want to have a preview of it and the user can decide rather download it or print it, like when you open a PDF in your browser.

I know that Aspose.Words has a Online Document Viewer (https://products.aspose.app/words/viewer) and I would like to know if there's a way to open a document in this viewer direct from code (via some API call).

If it's not possible using the Aspose Viewer, is there a way to view/render Word docs in the browser?

I did some research and found this thread (How do I render a Word document (.doc, .docx) in the browser using JavaScript?). The accepted anwser says that there is no browser with capabilities to render Word docs but this post is from 2015.

1 Answers1

0

Aspose.Words itself is a document processing library it does not provide any UI for viewing or editing documents. The document viewer app is a demo app, which uses Aspose.Words as it's backend. You can find it's sources here.

In your case you can convert your source document to some "viewable" format, like Image, SVG or HtmlFixed (HTML with absolutely positioned content, that imitates pages) and then display the result on your web page.

Alexey Noskov
  • 1,722
  • 1
  • 7
  • 13