Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

view a docx file in C# .NET

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 :)

like image 684
chathuradd Avatar asked Nov 15 '22 07:11

chathuradd


1 Answers

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.

like image 59
Ian Avatar answered Dec 18 '22 08:12

Ian