RE: "dual" files

"Dom Lachowicz" <[email protected]> Wed, 09 Jun 2004 10:07:52 -0400
Newsgroups gmane.comp.gnome.office.general
Message-ID <[email protected]>
&gt;recently i was thinking about a generic file viewer/reader for GNOME.
&gt;Eog does this job for images but it would be really cool IMHO to be
&gt;able to view all kinds of files even though you might not have the
&gt;actual file-producing application installed.
&gt;
&gt;Two possible approaches came to my mind:
&gt;
&gt;What about including say an svg version within each document (or do
&gt;it optionally). The XML nature of the gnumeric and abiword file
&gt;format should allow for that pretty easily (in theory at least :-)
&gt;This way might overlap with the plans for svg based gnome-office
&gt;embedding. Of course the resulting document files would be a bit
&gt;&quot;heavier&quot;.

I can say for the AbiWord folks - "no thanks". This is bad for at least the 
following reasons:

*) Bloats the file format and size
*) Bloats amount of code and complexity of code in the apps themselves
*) Assumes that the apps can save or print as SVG and capture the output 
(can't be done, but I have some experimental SVG printing support in 
GnomePrint)
*) Multi-page output requires use of the SVGPrint extension to the SVG 1.2 
standard. I can tell you that nothing under the sun supports SVG 1.2 or 
SVGPrint yet, and such support will likely be a long time coming.
*) XML namespaces and document nesting give me the heebie-jeebies

I could go on for a while but by now you get my point...

I should make note that if Gnumeric and Abi start to use a compound document 
format (i.e. JAR), it would be possible to create a "document thumbnail" 
stream or similar within the file, ala PDF. Moving to such a compound format 
won't happen in the near-term future.

&gt;A second possibility might be to somewhow split out printing code and
&gt;create a set of &quot;print drivers&quot; for commonly used file formats 
and
&gt;use them within the viewer and the respective application. An
&gt;intermediary solution could be the libegg way of including sources.

This is good on paper, until you realize that 80% of an app like AbiWord's 
codebase is required to create such a print driver, in which case you've 
essentially saved your user nothing and caused developers a great deal of 
pain.

There are a few suggestions that I think are more prudent if you want to 
have a generic "file viewer" application:

*) The major GO apps export a BonoboControl interface. Make your application 
use a read-only BonoboControl container and embed apps as necessary. Be a 
sport and take over maintainership of the BonoboPrint interface too while 
you're at it and bring it back from the grave.

*) The major GO apps export (or will soon export) a cmdline printer 
interface. Have the apps print to a PS, PDF, or SVG file. Pipe that to GGV, 
GPDF, RSVG, or whatever suits your fancy.

Dom

_________________________________________________________________
Get fast, reliable Internet access with MSN 9 Dial-up – now 3 months FREE! 
http://join.msn.click-url.com/go/onm00200361ave/direct/01/