I have some doc or docx files.I want to convert them to images automatically if I upload doc files to server. Does anyone have solutions to solve this problem? the final target is just like this. http://www.liuyang.gov.cn/lyswszf/rdzt/15762/content_114176.html thanks .
Asked
Active
Viewed 1,879 times
-1
-
1Look here for a solution: http://stackoverflow.com/questions/20326478/convert-word-file-pages-to-jpg-images-using-c-sharp – Stephen Panzer Apr 24 '15 at 02:59
1 Answers
3
use a third party component: Aspose.Words, it can do it for you.
Document doc = new Document(MyDir + "Document.doc");
doc.Save(MyDir + "Document.ConvertToHtml Out.html", SaveFormat.Html);
it also support save to Png format.
SaveFormat.Png: Renders a page of the document and saves it as a PNG file.