DocPreview - browser plug-in to view Microsoft Word documents in Safari
UPDATE: As of v3.0, finally released in early 2009, Schubert|IT’s Word Browser Plugin has been made a Universal binary. Therefore, DocPreview 0.1 is no longer needed. This post remains for historical curiosity. The Word Browser Plugin offers a more polished interface for the same task. Go try it out first. I will tweak DocPreview ( more as a challenge to myself to see if I can do what the good folks at SchubertIt have done ), though the original purpose of this plugin (filling the gap for Word Browser Plugin) has been served. Thanks for trying out the plugin, guys! Appreciate your help and feedback.
—
DocPreview is a lightweight WebKit browser plugin I wrote to display a text-only preview of Microsoft Word .doc documents, inline and within Safari 3.x (and, apparently, 4.x) on both Intel and PowerPC Macs. This behavior is much like the functionality provided by the PPC-only Word Browser Plugin from Schubert|IT. DocPreview, of course, is a universal binary plug-in — since Word Browser’s lack of Intel support is really why I wrote this plug-in.

Unlike Word Browser, DocPreview only supports WebKit-based browsers that can use .webplugin files. I am currently unable to support other browsers, since DocPreview is built against the WebKit API instead of the Netscape plug-in API. Frankly, the Netscape API is a mess, and I haven’t had the time to figure it out. A NSAPI guru who could point me in the right direction would be much appreciated.
Download
DocPreview.zip - v0.1
This is a proof-of-concept release. It passes the worked-for-me test — as in, I’m using this plug-in daily. While I believe it functions correctly, I make no guarantees as to stability and usefulness, and am not liable for blowing up your browser or any harm that might befall you through your adventurous use of this plug-in. Although, I do want this thing to work for everyone, so please leave me a note here if it doesn’t work.
(UPDATE 02/24/2009) - I see a few downloads already in my server logs, but no comments at all on this post. Can I assume it works for all of you out there? Or was it so broken that no one’s browser lived to tell the tale?
DocPreview features & limitations:
- Universal binary support, for use on both PPC and Intel Macs. No Windows Safari support — and plus, there are already good solutions for inline doc browsing on the Windows side. If you’re on PPC, I suggest you use Word Browser Plugin instead unless you desperately need find-on-page using Safari’s built-in facilities with Word docs.
- Tested extensively on Safari 4.0b1, 3.2.x, and somewhat with Shiira 2.x. May also work on earlier Safari versions, but I simply do not have the ability to test the plugin against them.
- Uses OS X’s internal engine for opening and processing Word files. DocPreview performs as well (or as badly, depending on your opinion) as OS X itself for the same task.
- Supported on OS X 10.5 for .doc, .docx, and .odt files. On OS X 10.5, the plugin can parse Microsoft’s new OpenXML (.docx) and OO.org’s ODF Text (.odt) documents. On 10.4, the plugin will still work, but only for .doc files.
- Support for full document view mode or embedded mode (if the page author uses object and embed tags, like with Flash objects — although, who actually does that with .doc files? )
- In full document view mode, DocPreview uses Safari’s built-in Find and Text Zoom abilities. Any command that can be run on a normal Safari webpage can be performed on a DocPreview rendering.
- In embedded mode, Find on Page and Text Zoom support are implemented separately. I’m still thinking about how I can hook into Safari’s built-in system from within an embedded plugin. Since no one ever uses embedded .doc files anyway, the point is fairly moot for most users.

To install, drag DocPreview.webplugin into
/Users/<your name>/Library/Internet Plug-ins
or
/Library/Internet Plug-ins.
Screenshots of the plug-in in operation can be seen to the right of this post. The first pair of images are .doc files in full document mode in the browser and in Word 2008. The second pair of images are two documents embedded inline using object tags, and one of them shown in Word 2008. As you can see, the conversion fidelity is fairly decent — this is the same level of fidelity that you would have gotten by importing Word data into TextEdit, or using textutil on the command-line.
DocPreview serves the same purpose as Word Browser. It’s intended as a quick preview (much like how Google indexes the text in .doc files), so you don’t blindly download any Word files that actually don’t interest you.
( As an aside, I cannot understand people who want to disable built-in PDF support in Safari :p . That feature has singlehandedly improved my productivity/research output by a magnitude. )
In any case, this is a quick hack, since I expect Apple to support .doc previews with the next version(s) of Safari, very soon. MobileSafari on the iPhone already provides .doc viewing support (and .xls, if I remember correctly). On Windows, MS provides read support for .doc files within the browser. DocPreview is just a temporary solution for Safari users until official Apple support (or better yet, better Microsoft Office integration) arrives.
If the thing doesn’t work for you, let me know via the comment thread. If it does work, let me know too
Any suggestions and comments welcome.


it works for me. so at least you have one more data point. why not post it to macupdate or versiontracker? might get you more traffic.
Basic Doc preview, but works to open the doc in the browser. Good work!
Yep, definitely a simple little hack - not much more than a basic preview, so treat it as much. More advanced parsing, as much as I would love to have that too, needs someone with a lot more knowledge of .doc file formats.
Thanks, guys. Now at least I know other people managed to get this thing working.
Very smart utility, works correctly, I dont loose any more time in opening word to preview reports from our intranet patients database.
Thanks a lot.
It deserves to be in versiontracker, it was a bit difficult to find this with google.
HB, MD
This is a fantastic plugin! Life is soo much easier now when dealing with accessing coursework online.
Does this plugin works on windows xp too?
You don’t need this plugin if you have Windows XP. Just install MS Office and use Internet Explorer, which comes with an ActiveX extension. Use these instructions from Microsoft to make sure it’s set up correctly. It works not only for .doc files, but pretty much all Office documents.
Only us Mac people have to deal with not being able to open Office files in our browsers