-1

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 .

Deduplicator
  • 44,692
  • 7
  • 66
  • 118
Youku KMSFan
  • 67
  • 2
  • 12
  • 1
    Look 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 Answers1

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.

Nagaraj S
  • 13,316
  • 6
  • 32
  • 53
sendreams
  • 389
  • 2
  • 13