How to Read a word document in asp.net in mvc - asp.net-mvc-5

can any one help me to find out the solution to show/Read the word
documents in asp.net mvc any example or any suitable links. searched a lot on internet for suitable
article but did not find any thing helpful. i have implemented the
download functionality of the document. but can not able to read or
preview the documents.

You could use the Office Web Viewer provided as a service from Microsoft .
What is the Office Web Viewer?
It’s a service that creates Office Web Viewer links. Office Web Viewer links open Word, PowerPoint or Excel files in the browser that would otherwise be downloaded. You can easily turn a download link into an Office Web Viewer link to use in your website or blog (e.g., recipes, photo slide show, a menu, or a budget template).
Office Web Viewer: View Office documents in a browser
Some benefits of the Office Web Viewer include:
You don’t need to convert Office files for the web (e.g., PDF, HTML).
Anyone can view Office files from your website or blog, even if they
don’t have Office.
It keeps eyes on your website or blog, because readers don’t need to
download the file and they stay in the browser.
One link will work for computers, tablets, and mobile phones.

To manipulate .docx files (as well as .xlsx, .pptx, etc.) you would use Open XML SDK (also available as installer from Microsoft download centre).
The PowerTools for Open XML, which greatly simplifies working with Open XML SDK, contains functionality for
High-fidelity conversion of DOCX to HTML/CSS using HtmlConverter.cs
I've only used this SDK and Powertools to manipulate Word documents, so could not say much about conversion to HTML/CSS. But this could be one of your options for previewing Word documents, although it is a complicated way of solving your problem.

Try the MVC viewer in Gnostice XtremeDocumentStudio .NET.
ASP.NET MVC document viewer using ASPX and Razor engines.
DISCLAIMER: I work for this company.

Related

Embed Excel in a website to edit a locally stored document

Is it possible to embed google excel in my website to edit document stored locally?
My manager asked me if it is possible to integrate the Microsoft office webapp in my own website.
Clients have excel files stored on our website, we want to know if it is possible for them to open the file with a web excel page, edit the file and save the modifications. For now, they use SharePoint so it is easy for them but we intend to use an other platform.
Our client can have all the license we need.
I searched but I didn't find any solution.
I know you should be able to do this with ASP and the .Net Framework. SharePoint uses ASP pages, so you may try to do something simpler.
If you go over the Internet you'll see several solutions because people do this too.
e.g. a thing you can do is to use Open XML API to do this, and it is like reading / modifying a flat file on the server. A restriction is it has to be .xlsx / 2007 format onward.

Integrate pdf excel word viewer on a website

I would like to integrate a viewer tool for viewing files in pdf, excel, word formats. I am developing a website that store manuals and I would like visitors to have an ability to view these manuals online instead of downloading. I found a tool named ViewerJS that can view PDF and Open Documents online. However the tool doesn't support Microsoft Office.
You should probably use the Google Drive API
https://developers.google.com/discovery/libraries & https://developers.google.com/picker/docs/

Defining Default Open Behavior in Sharepoint 2010 + Office Web Apps with Custom Webpart

I am running Sharepoint 2010 with Office Web Apps. By default, any document of type .doc, .ppt, etc... will open within the browser from the document library. This is fine, however I am using a web part that is pulling in an XML feed that displays a search engine result list that contains URL links to Word and PPT documents.
I would like to have these links behave the same way as they do in the document library (open in browser), however the user is prompted to download these files instead. Is it possible to dictate this behavior in Sharepoint?
Unfortunately I don't think this is possible unless the documents are hosted in SharePoint and the Office Web Applications feature is activated. The in-browser behaviour is made possible by this server-side feature. I assume that the search-engine derived links you are getting will not, in general, be SharePoint hosted documents.
It is possible to open documents in the browser, but this is a client setting and will depend on the client operating system. You say you want to control this from SharePoint, and I can't think of any way you can do this.

best way to automatically convert microsoft office documents

What is the best way to convert Microsoft Office documents automatically on a server? We need to convert lots of such documents automatically to PDF files. Currently we use PDFCreator with an OLE script, but it is a fragile process since Microsoft Office popups keeps interrupting the flow.
I have tried OpenOffice, but it is not good enough at converting Microsoft Office documents.
We've used the Oracle OutsideIn technology (formerly known as "Stellant") to do conversions of Office documents to XML. It was 99% effective, but there was the occasional document that would confound it.
http://www.oracle.com/us/technologies/embedded/025613.htm
They appear to have a PDF Converter component, but I have not used it.
OutsideIn is pretty pricey. They are targeting the enterprise customer.
--
There's also KeyView from Autonomy, but we have not used that either. Looks like they do not have a direct to pdf option, but they do go to html directly.
http://www.autonomy.com/content/Products/idol-modules-connectors/index.en.html
Not sure what you mean by 'automatically', but try Google Documents. You can upload .doc files in bulk to be converted to google's format. From there, you can export (in bulk) to PDF.
To use Google Docs, get a gmail account (or google apps account) and go to docs.google.com

Is there a library that takes Microsoft Office files (Word/Excel/ppt) and renders images of them?

I'm building a webapp, and I need the ability for users to view Word/Excel/PPT files in the browser (these files are stored server-side). This is to offer them a quick way to preview the document without needing to download it and launch Microsoft Office.
Pretty much looking for the "View" feature for email attachments in Gmail. I'm assuming that Google is somehow rendering the doc formats into images and displaying them in the browser.
Is there a way to do this in OpenOffice?
I do not know whether you can do this with OpenOffice, but SpreadsheetGear for .NET will let you open an Excel workbook and get an image from ranges of cells or charts.
You can see some examples of this here.
Disclaimer: I own SpreadsheetGear LLC
Here is a way to do generate images of office files, doing all of the processing on your server:
On server-side, run OpenOffice in server mode (no UI, just the API is callable).
Call the OpenOffice API to translate any office file to PDF (See how the open source software Alfresco does this).
Then convert PDF to PNG using ImageMagick.

Resources