ODF reader for Firefox

0 views
Skip to first unread message

vir...@gmail.com

unread,
Dec 29, 2005, 8:10:21 PM12/29/05
to
I've created a little Firefox extension that allows ODF (Open Document
Format) files to be viewed directly in Firefox without a helper app.

Essentially, the extension consists of a javascript stream handler that
unzips the ODF archive and extracts the "content.xml" document. It then
chooses an appropriate XSLT stylesheet, based on the document's
mime-type, that translates the ODF document into XHTML + CSS. This is
actually easier than it sounds, because the ODF style properties use
many of the same naming conventions and measurement units as CSS
(aren't standards great?)

The current implementation is highly experimental and only supports a
few basic style properties, such as bold, italic, underline,
font-family. left-margin, and so on, however there's no reason why this
couldn't be extended to cover a large number of ODF properties. While
the ODF standard itself iis quite large, I have also found it to be
fairly comprehensible.

My intent with this is not to try and provide a pixel-perfect rendering
of an ODF document, but rather something that is readable, attractive,
and doesn't lose any essential information. Specifically, I would like
for an ODF user (such as, say, a civil servant working for the
Massachusetts state government) to be able to toss their document onto
a shared directory on an FTP server and allow internet denizens to view
the content of the document, without having to do any kind of special
conversion step or reformatting of the original source doc.

And I see no reason why it shouldn't be possible to do a much better
job of conversion than the current "View as HTML" option for PDFs as
implemented by Google.

Unfortunately, with all my other projects I don't have a lot of time to
work on this one. I would be willing to make the source available if
anyone is interested in hacking on it or playing with it. If there is
some convenient repository where I could place a copy of the code, I
would be happy to post a link here. (In particular, I don't want to
create a source forge project and then abandon it, I've made that
mistake before :)

-- Talin

Nuno Silva (aka NJSG)

unread,
Dec 30, 2005, 3:57:32 PM12/30/05
to

I want to look at your extension. Can you send me it by e-mail?

My e-mail address:

nunojsg AT gmail DOT com

--
Nuno Silva (aka NJSG)
Lisbon, Portugal
http://njsg.no.sapo.pt/
Registered Linux User #402207 - http://counter.li.org
Mozilla/5.0 (X11; U; Linux i686; pt-PT; rv:1.7.12) Gecko/20050929
Thunderbird/1.0.7 Fedora/1.0.7-1.1.fc3 Mnenhy/0.6.0.104
Fedora Core release 3 (Heidelberg) - Kernel 2.6.12-njsg - i686
Intel Pentium II (80686) Deschutes - 334Mhz -- 256 Mbs SDRAM

A: Top-posting.
> Q: What is the most annoying thing in the Internet?

signature.asc

Chris C

unread,
Jan 2, 2006, 8:00:00 PM1/2/06
to
vir...@gmail.com wrote:
> I've created a little Firefox extension that allows ODF (Open Document
> Format) files to be viewed directly in Firefox without a helper app.

That sounds all kinds of awesome. I'd be interested in having a look.
It's a pity this didn't happen a few months ago, this sounds like
exactly the kind of killer extension MoCo are holding a competition for
just now.

- Chris

Gervase Markham

unread,
Jan 5, 2006, 6:49:55 AM1/5/06
to vir...@gmail.com
vir...@gmail.com wrote:
> I've created a little Firefox extension that allows ODF (Open Document
> Format) files to be viewed directly in Firefox without a helper app.

That sounds extremely cool. If you can get it working (even for a small
part of ODF), why not enter it for the Firefox extension contest?
http://developer.mozilla.org/contests/extendfirefox/

Deadline is midnight Eastern Time on January 6th (tomorrow)...

Even if you don't enter it, please post the code publically (ideally
under the normal mozilla.org tri-license; see
http://www.mozilla.org/MPL/), then someone else can pick up the baton.

Nice work!

Gerv

Reply all
Reply to author
Forward
0 new messages