-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
  • 43,322
  • 6
  • 62
  • 109
Youku KMSFan
  • 67
  • 2
  • 12

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
  • 12,994
  • 6
  • 31
  • 51
sendreams
  • 375
  • 2
  • 13