Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Converting a Microsoft Document Imaging (.mdi) file to PDF (or JPG) in ASP.net

Do you know how can I deal with this format in the server?
I want to let the user upload the file and then download it as PDF or JPG

Edit:
So far, the only "component" I found is MDI2PDF, and it only have a command line tool, not a real DLL to call.

like image 853
Eduardo Molteni Avatar asked Jul 01 '09 17:07

Eduardo Molteni


1 Answers

Since the Microsoft Office Document Imaging (MODI) format contains private extensions to the TIFF format, your best bet is to use the Microsoft Office Document Imaging Object Model:

Using the Microsoft Office Document Imaging 2003 Object Model

You don't need a full-blown Office install, just the MODI part. In essesnse, it would be the same as installing any other "component" on the server.

Once installed, you can open the MDI doc, and "SaveAs" as TIFF file, which can then be readily imported into a PDF using a variety of PDF SDKs, or your can convert the TIFF to JPEG or whatever other image format you wish.

like image 108
GalacticJello Avatar answered Sep 19 '22 20:09

GalacticJello