Re: Generic Embeddable plugins.

From: <msevior_at_physics.unimelb.edu.au>
Date: Wed Jan 12 2005 - 23:48:07 CET

>
> On Wed, 2005-01-12 at 16:51 +0100, Jean Bréfort wrote:
>> Human readability warrants that the data will not be loosed if binary
>> format changes.
>
> It is the responsiblity of the creator application developer to keep
> compatibility. And the image preview, preferably in SVG, will guarantee
> at least viewing and printing of the aforementionned data. This preview
> would be a requirement.
>

I plan to mkae the default implementation of makeSnapshot() create a PNG
snapshot of the embedded content. We already have the code to do it.

Clearly it would be preferable to have a SVG snapshot but that requires
that some extra work on the part of the plugin.

I think that in many case of programs in external address spaces, like
say, gnumeric or ghostscript, if a SVG snapshot is present, the render
method should display that rather than call the external program. Clearly
we don't do this if the data that is displayed in the external program has
changed (via the editMe() method).

I'll also point out that every program that uses gnome-print to print
itself, can easily generate an SVG image of itself.

So it is in fact rather easy to write a generic, gnome-print plugin,
usable by all program that employ gnome-print as long as they can
implement a rather simple but useful command-line argument.

AbiWord extracts the file-data of said program from itself. then calls
said program with a command-line argument to print to SVG. Let's say
Gnumeric does this...

AbiWord issues the command line argument and waits for the SVG file to be
written.

gnumeric --to=/tmp/mygnumeric-data.svg /tmp/mygnumeric-data.gnumeric

The SVG file is then loaded as the SVG snapshot and displayed as such.

Knowing what program to call is also straight forward.

We can store the MIME type of the data type as a attribute of PTO_Emebed
"mime-type:blah blah"

We can store the program name that generated the image at the time the
image was inserted.
"generator-program:xxxxxx"

We can even store whether the exact program should be employed over the
default MIME type as an attribute.

My thinking is that the external data source is stored in memory in
exactly the form it was passed to AbiWord. Like plain text mathml for the
MathML plugin or gzipped XML in the case of gnumeric or plain text
postscript in the case of a postscript plugin.

I guess this implies that it is written to the *.abw file as base 64
encoded data.

I do not think it should be directly incorporated into the *.abw XML
namespace.

Cheers

Martin

> Hub
> --
> Crazy French - http://www.figuiere.net/hub/
>
>
Received on Wed Jan 12 23:49:10 2005

This archive was generated by hypermail 2.1.8 : Wed Jan 12 2005 - 23:49:10 CET