homepage Welcome to WebmasterWorld Guest from 54.204.94.228
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
Forum Library, Charter, Moderators: bakedjake

Linux, Unix, and *nix like Operating Systems Forum

    
MS Office Doc Thumbnails
How to extract MS Office Doc thumbnails on *nix?
redthor




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

Hi,
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,
r

 

cws3di




msg:907991
 6:22 am on Sep 2, 2005 (gmt 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...

mcvicar




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

Hi,

Did anyone have any luck with this?

Thanks

vincevincevince




msg:3609094
 1:00 pm on Mar 24, 2008 (gmt 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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved