Vasanth
Vasanth

Reputation:

Convert Word document [Multi Page] into JPEG File in C#

I want to convert the contents of word file [3 or 4 page document] into JPEG file in C#.

I have tried using clipboard option, but it is converting only the first page. Please help me.

Upvotes: 1

Views: 6273

Answers (1)

ObeseCoder
ObeseCoder

Reputation: 401

i think that ghostscript can output jpeg

so the process would be:

  • first configure a postscript printer (print to file as the printer port)
  • print the msword document to a postscript file
  • process that file with GhostScript, you have many output options here

you can code the whole thing in C# here is a wrapper for ghostscript in c# ... and you could use COM interop to work with msword

this solution isn't the best for a public webserver though, as it would require msword to be installed

i have worked with excel before in this way (through COM interop on a webserver) to extract data ... but that was on an internal company webserver

Upvotes: 2

Related Questions