0

I am investigating the effort it would take to render a Microsoft Office XML file (.docx, in this case) to an image programmatically. For illustration, I want to achieve something similar to Apple's QuickLook preview for said file. Requirements:

  1. Must be portable (specifically, it will not run on Windows, nor any other platform with Microsoft Office)
  2. Needs to be headless and reasonably resource constrained (think VPS!).
  3. Preferably a self-contained, well-maintained open-source solution :)
  4. Text extraction would be nice (although another library could be used for that - I already have this)
  5. A good online service could do it as a last resort, if I fail to find a good offline solution
  6. Accuracy is good, but not the primary goal here.

My attempts to locate such a library have not been entirely successful. There are a few Java-based projects that seems to have sprung from OpenOffice, but they all either seem a bit heavyweight or have the wrong focus (i.e. text extraction, search, document generation).

To reiterate, I am looking to render the document (e.g. to a PNG). Speed and memory use is more important than features such as OLE images, equations, advanced formatting and whatnot.

Krumelur
  • 31,081
  • 7
  • 77
  • 119
  • Are all the documents a good fit for image display? Typically PDF is more suited because of multiple pages, zooming etc. Are you just wanting page1 imaged? – Paul Jowett Aug 08 '12 at 01:14
  • I would probably need to render page `k`. My goal is to provide a readable overview of a certain document on a web page. – Krumelur Sep 16 '12 at 19:57
  • On another (unanswered) question the asker mentioned a commercial product called Aspose. You may want to check it out if a commercial tool is okay in your scenario http://stackoverflow.com/questions/5921761/is-there-any-way-to-generate-a-thumbnail-image-of-a-docx-file – GrahamMc Jun 09 '13 at 07:30
  • @GrahamMc Thanks for the tip. Commercial tools would have been OK, but I wanted portability, which I am not sure the .NET component would provide. In the meantime I solved this with an easily deployable Windows virtual machine. – Krumelur Jun 22 '13 at 19:33

0 Answers0