I need to create C# .NET solution to view a .docx file directly from the database without writing on the hard disk. What would be the most feasible approach ?
One option would be to convert the docx file to .mht format and save in the database as blob type. But I could not find a way to directly view it from the database.
Another way is to convert the docx file to .jpg file which can be directly viewed from the database using picturebox control in .NET. The approach taken was to first convert docx to .mdi and then to .tiff format (using Microsoft Image Writer) and the converting to jpeg. But this involves several IO operations which reduces the efficiency and reliability of the solution.
If anyone know ways of improving the above options or any new ideas it would be really appreciated. thanks in advance :)
Might be worth looking at Aspose.Words. Handles all the docx format for you and they render a page of the document in several image formats for viewing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With