Reputation: 39453
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.
Upvotes: 7
Views: 30022
Reputation: 11445
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.
Upvotes: 2
Reputation: 144
I had a similar problem some time back but I was using tiff files. To generate the pdf I used the .net frameowrk itself to extract page images from a multi pahe tiff file and using itext create a pdf document. Regards Shivam
Upvotes: 0
Reputation:
Try Installing the PDFConvertor from Http:www.sourceforge.net/projects/pdfcreator, Post which you can invoke the normal print option & choose PDFCreator as the printer on which you want the output. Hope this helps. -- Sridhar Kris.
Upvotes: 0
Reputation: 24535
Using Office automation, one can open a lot of various file formats, eg html, word etc, not sure about MDI, but if you can open these in Office (or use Office Automation) all you need to do is print to the generic Microsoft PostScript Printer Driver to create PostScript (PS) file, once you have that you can convert it to PDF using GhostScript.
Upvotes: 0
Reputation: 415
This forum thread may provide some insight into how to do it:
http://www.docu-track.com/forum3/viewtopic.php?f=48&t=5637
It looks however like the MDI format is simply a TIFF derivative. You may have more luck trying to convert the .mdi from TIFF format to PDF, instead of searching for/trying to convert .mdi to PDF.
Upvotes: 0
Reputation: 5130
If you can't find an API that will do the work, then one possible solution could involve creating a small program that monitors a specific folder for newly uploaded MDI files, performs the conversion (using the tool you linked), then places the resulting jpg file into another folder where it can be downloaded from. A database table could be used to coordinate the state of the job, i.e. whether it's complete, where is the resulting file, etc.
The downside to this approach is the user may not get instant results back, depending on how busy the job is.
Upvotes: 0