I have word documents saved on database as varbinary(max). My final goal is to allow the final user to print it on his machine. That's all I want. And I am very open to all the possible solutions.
The solutions I've tried so far :
I tried to load it from Database, and display it on the browser. But I found that no browser can display a word document. Unless we use iframes: How do I render a Word document (.doc, .docx) in the browser using JavaScript?
But this solution is not working for my case since, since the final user does not have internet connection on his computer. He can only access a local network.
The second solution I've tried is to retreive the word document from the database, save it to a temp folder and convert it to PDF using this library WordToPDF, and finally display it to the client:
http://www.c-sharpcorner.com/UploadFile/698727/convert-word-file-to-pdf-using-C-Sharp/
The problem with this method. It is not working under IIS after publishing. Without mentioning the big time that takes to convert a word to a PDF.
The third solution is to retrieve the document from the database, save it to a temp folder, and use Process.Start to open the document under Microsoft Word. And again the same problem. It is not working under IIS after publishing. PS: the server is installed on the same machine as the final unique client.
These solutions to start process under IIS, did not work for me : IIS7 does not start my Exe file by Process Start
Why is it so hard to let the client print or even access a document already saved on database ? I am very open to all the possible solutions