Friday, 23 Mar 2007
Friday, 23 Mar 2007
For the first part of the question, the answer is quite easy at the first look: OpenOffice already offers an SVG export filter for many years.
StarOffice/OpenOffice.org was one of the first 'fat' productivity suites tightly integrating this feature into its feature set. To be precise, this export filter was the outcome of a new kind of Internet printing protocol, some people from Sun worked on at that time, requesting some applications to implement this protocol for prototyping purposes. SVG has been chosen as the format to transport the content of single pages. From that time on, the filter was part of OOo, got some rework from time to time, but wasn't really in focus of our daily work as much as it should have been.
On the other hand, being far away from a perfect export, it helped many people with their first steps regarding SVG content creation and even at the first OpenOffice.org conference, held in Hamburg a few years ago, I met some people using this technology for their quite impressing educational framework, for which OOo was an essential part of.
The question regarding an SVG import can be answered quite easily, too: there is already an import filter solution available, that has been created by community member Dr. Bernhard Haumacher and that can be found at http://www.ipd.uni-karlsruhe.de/~hauma/svg-import. The main reason for not being part of OOo itself is, that its requirements regarding the baseline are quite on the high side, due to the fact that it requires the very good but huge Batik framework (http://xmlgraphics.apache.org/batik) as an essential part to work. Nevertheless, many thanks and congrats to Bernhard from my side for his great work on this.
Next step to overcome the lack of an integrated SVG import filter is the Google Summer Of Code (GSoC, http://code.google.com/soc) application proposal, hosted by the community members Jan Holesovsky and Fridrich Strba as possible mentors. Current state of this project is, that it has been announced as a GSoC proposal but still needs final approval (http://wiki.services.openoffice.org/wiki/Summer_of_Code_2007).
So, coming back to our initial questions, the answer would be that OOo already has full SVG support, but for sure needs to be improved quite a lot to reach the status of a full featured SVG authoring solution. Improvements begin with the addition of many many enhancements to the export filter for which I already have a bunch of tasks. Exporting whole presentations including slide transitions and object animations is also on the top of my wish list, offering an alternative to Flash or PDF based presentations. Getting an integrated SVG import filter during this years Google Summer Of Code would be really great, and last but not least, replacing the internally used WMF format for vector graphics with SVG is one the things OOo needs.
I already got some requests from community members to work on this, which is absolutely great. I will definitely come back to you as soon as we have a clear picture of the things we need and how to implement them best, basically. Any input from your side is highly appreciated.
All the other users of OpenOffice.org, waiting for solutions for their needs, please be assured that this is still a hot topic, even if you may have the feeling that it is not.
tags: gsoc openoffice.org svg
Comments
I feel the issue of SVG-support has not been fully understood by Kai. As has been pointed out, the need for SVG-import into Draw has already been addressed. This is not at issue. However, SVG *import* is not "full support". What is required is the ability to embed and render SVG natively in *all* document types, just like OOo does for PNG, JPEG, WMF etc.. This is permitted by the ODF specification: all that is required is a native SVG-renderer (this could be implemented as a java extension using Batik, for example).
I want to be able to insert an SVG into a Writer document and have it rendered directly. When I save the file, I want the original SVG saved inside the .ODT xml (or link to an external SVG URL). I do *not* want to have to import each of my SVG figures into Draw then cut 'n paste them into Writer as OLE objects (so losing the original svg). The ability to author SVG in OO-Draw is less important (though still quite nice) as there are many other OSS SVG-authoring tools available. But what's the point of having SVG tools and artwork if you can't using them in any office documents?
I tried to spell this out clearly, so I hope I don't sound too blunt.
Posted by Bryan Cole on March 23, 2007 at 09:52 PM CET #
"Getting an integrated SVG import filter during this years Google Summer Of Code would be really great, and last but not least, replacing the internally used WMF format for vector graphics with SVG is one the things OOo needs." </br>
This should be understood as exactly what you described: anywhere where you can use WMF (e.g. inserting them into Writer or use it for replacement images of OLE objects) you should be able to use SVG. </br>
Posted by Mathias Bauer on March 23, 2007 at 11:04 PM CET #
It's the priority which seems misplaced to me. This was my point.
An import filter which loses the SVG, by internally transforming it to ODG is of limited value. This throws away the advantages of using SVG (which is the ability to re-edit your embedded/linked graphic using any of the many SVG authoring tools available). Once you convert to Draw, you lose this. As well as this problem, it's also duplicating functionality already available in the SVG Draw import filter extension (I'm not convinced the size and java-1.5 dependencies of this plugin are that big a problem, but maybe others think different).
Thus, I think an import filter may not be the best use of of a SoC project. If someone is to be sponsored to work on this, better would be to go straight for a SVG->GDI renderer (I think the work involved is about the same) and get the ability to render SVG (even if you can't edit them directly in OOo). A "convert to Draw" function could be added later. Essentially I'm saying "hey, don't work on that feature! Work on this instead!". ;-)Posted by 62.253.128.11 on March 24, 2007 at 12:29 PM CET #
As I'm working on the Writer project I agree with you: give us the SVG->GDI converter first. But Kai is working on the Graphics project so maybe that could explain if he has different priorities.
Posted by Mathias Bauer on March 24, 2007 at 12:39 PM CET #
Posted by Kai Ahrens on March 24, 2007 at 02:03 PM CET #
Posted by 62.253.128.11 on March 24, 2007 at 06:51 PM CET #
Posted by JZA on March 26, 2007 at 01:03 AM CEST #
Posted by JZA on March 26, 2007 at 11:36 PM CEST #
Posted by Kai Ahrens on March 28, 2007 at 02:16 PM CEST #
Posted by JZA on March 28, 2007 at 04:43 PM CEST #
Posted by AngryMike on March 29, 2007 at 01:21 PM CEST #
Posted by Jeff Schiller on March 29, 2007 at 04:52 PM CEST #
Ugh, your HTML parser swallowed my whitespace/formatting. Should have used the Preview button! :) Here it is again:
SVG handles this via the foreignObject element. I've only briefly looked at the ODF spec, but if you compare:
How difficult would it have been to use the svg:rect (i.e. the rect element in the SVG namespace) within ODF instead of inventing your own draw:rect element? You could have added any number of draw: attributes to the svg:rect element as long as they are defined in their proper namespace. I am not spec expert, so I'm genuinely curious as to what challenges that would have posed.
Posted by Jeff Schiller on March 29, 2007 at 04:55 PM CEST #
Posted by Christian Lippka on March 30, 2007 at 10:24 AM CEST #
That's fine, but being unfamiliar with ODF, I don't know what those "other features" are that ODF required for a rectangle - can you give an example or two of what other SVG elements would have been required?
The "X" in XML is for eXtensible, right - so it just seems like you could have taken svg:rect and extended it using your own attributes and child elements in your own namespace. Again, I will freely admit I have no experience with the ODF though.
Thanks,
Jeff
Posted by Jeff Schiller on March 30, 2007 at 02:59 PM CEST #
like any other shape in ODF a draw:rect can have a shadow. The geometry of the shadow is then created on the fly by the application and not exported inside the odf format, which would be required for svg.
Again, XML is not XML, ODF is not SVG for a reason since it target different types of applications. If you think that ODF is not what you want then you are free to create your presentations with a SVG editor. Sure we could have named the draw:rect as svg:rect but it would have no benefit at all. See it as documentation that there is more to draw:rect than that what is specified and documented for svg:rect. If you go on and just replace draw:rect by svg:rect in an odf document you will find that still no svg renderer will render that file correctly. You need at least do an xslt transformation anyway and then you get the translation from draw:rect to svg:rect nearly for free but you would have to add transformation code for all other features that are part of ODF which are not part of SVG.
I think the main concept that is hard to understand is that ODF is not an eXtension to SVG, its a different format for a different type of document.
Regards,
Christian
Posted by Christian Lippka on March 30, 2007 at 03:13 PM CEST #