Welcome to WebmasterWorld Guest from

Forum Moderators: bakedjake

Message Too Old, No Replies

MS Office Doc Thumbnails

How to extract MS Office Doc thumbnails on *nix?



2:10 am on Sep 1, 2005 (gmt 0)

Inactive Member
Account Expired


Is it possible to extract the saved thumbnail bitmap from a Word (or any office document) on Linux-Apache-PHP platform?

In the COM world it's IExtractImage - wondering if it can be done on Linux...

Background information:
In Microsoft Office files there's an option in File -> Properties to 'Save Preview Picture' which creates a small bitmap that can be seen in Windows explorer when in the Thumbnail view mode.

If anyone has any possible pointers/ideas I'd greatly appreciate it. (COM-C++ bridge/ImageMagick/wvWare something!)

Thanks in advance,

6:22 am on Sept 2, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Apr 25, 2004
votes: 0

Hola redthor

Typically when a client sends me an MS Word .doc file with images embedded in it, I use StarOffice to open the file, then save it in another format that I can use.

Most standard boxed Linux versions (e.g. SuSE or RedHat) come with StarOffice, so dig around in your desktop menus or pull up an xterm and type in the command line: soffice &

You might get lucky and have it.

I have had StarOffice reject some versions of MS Word docs, but if you can open it, try saving the file as an HTML file. The actual .html file that it saves is not exactly the cleanest code in the world (to put it mildly) but you will find that all of the embedded images from the .doc are now saved as .jpg files in the same directory path where you saved the .html file.

The above post is made under the assumption that you have some sort of boxed Linux install, so if you have further problems, make sure you post your Linux version...

12:06 pm on Mar 24, 2008 (gmt 0)

New User

5+ Year Member

joined:Mar 24, 2008
posts: 1
votes: 0


Did anyone have any luck with this?


1:00 pm on Mar 24, 2008 (gmt 0)

Senior Member from MY 

WebmasterWorld Senior Member vincevincevince is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Apr 1, 2003
votes: 0

First, convert the file to a .odt (opendocument text) file, you can do that with openoffice or abiword. Both are possible from the command line.

After that, just unzip the file:
unzip whatever.odt

You'll find a new directory created called Thumbnails, in which is the .png thumbnail you want.

Of course it is possible to automate this much more than I've discussed, including pulling the thumbnail directly from the zip without expanding it all.