Difference between revisions of "SVG User Experiences"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Problem with text position in Geonext generated SVG.)
Line 494: Line 494:
  
 
[http://www.ycombe.net/documents/svg/mediatrice.svg Here is one file générated by Geonext].  
 
[http://www.ycombe.net/documents/svg/mediatrice.svg Here is one file générated by Geonext].  
 +
 +
=== Update: not completly fixed (r2185) ===
 +
I have just tested with r2185 version (svg-import-r2185.uno.zip). The text position looks better.
 +
 +
There is two bugs:
 +
# Some text should be masked. It's not.
 +
# The text appears with light blue background. Should not.
 +
 +
[http://www.ycombe.net/documents/svg/mediatrice.svg the tested file].
 +
[http://www.ycombe.net/documents/svg/mediatrice_svg_imported.png the screenshot with the bugs]
  
 
[[Category:User Experience]]
 
[[Category:User Experience]]

Revision as of 21:00, 28 June 2007

OOoSVG-110.png
SVG Import
(external impl.)
Overview
Download
Source code
Features
Restrictions
FAQ
TODO
OpenDocument
Gradients
Group opacity
Elliptic arcs
Path semantics
Coordinate systems


Please add your feedback to this page by pressing the edit button at the bottom of the page! Before, you have to register (press the 'register' button in the menu to to the left). The registration is free and easy - and only required to prevent spam on the pages.

-- BernhardHaumacher - 18 Aug 2005

Problems with Import SVG from Sodipodi flag collection

I tryed to import svg files from Sodipodi flag collection. I saved all of SVG files to a dir and tryed to open one by one. I get the next results: 1) Some files is not openable (General I/O error) 2) Some files is not openable (Nothing happen) 3) Lot of files load well and looks good 4) Some files have convertation problem

[I will continue the description whitin hours]

http://www.sodipodi.com/index.php3?section=clipart/flags&area=flags

-- KAMI - 27 July 2006

Import SVG in OO Writer as OLE Object

After installing the svg-import package I'm able to display a svg image as OLE object in OO Writer. My problem is, that the left top corner of the page where the graphics is on is displayed in the result in openoffice.


-- TheTschaena - 18 Oct 2005

Problem loading image

Hello, I tried to import a simple firewall picture from openclipart.org in my OpenOffice (1.9.130) over Fedora Core 2, but I get an "unknown format error" while I've successfully installed the svg-import-r2009 package. Is it because the image has some unsupported feature ? You can easily get the image by searching for "firewall" in the search engine of the main page of www.openclipart.org if needed (2 identical pictures found).

--

We are talking about http://openclipart.org/clipart/computer/firewall_denco_01.svg? I can "File/Open" that image with . You possible tried to "Insert/Picture/From File"? This is (currently) not supported by SVG import (see the post below). Open the image and Cut&Paste it into your document.

BTW. When loading this firewall image, it looks broken in - This cannot be completely explained with gradient problems and needs further evaluation.

-- BernhardHaumacher - 26 Sep 2005


Problems with transparency gradients

I tried your brand new version =svg-import-r2009.uno.zip= using OOo 1.9.124 (the build provided by Novell/SUSE) with Java 1.5.0_03 (part of SUSE Linux 9.3). The filter works quite good. Although differences to how Inkscape renders the sample image can be seen (screenshot, 132kB). The image is taken from [1].

-- ReneAuberger - 26 Aug 2005

This SVG image excessively uses transparency gradients. However, the result in Draw is that areas that should have been transparent are rendered black. My first impression was that this is a bug in Draw, but this is not the case. The filter in fact produces wrong results for transparency gradients, because I misinterpreted the specs for gradients and opacity. This will hopefully be fixed in the next release. Gradients seem to be most important for artistic images.

Rene, thanks for the hint!

-- BernhardHaumacher - 27 Aug 2005


Lenghty error message during Installation

I tried installing this package "svg-import-r2009.uno.zip") into OpenOffice 1.9.113 but got a java error at the very last stages of installation. (com.sun.star.uno.RuntimeException){ { Message = "[jni_uno bridge error] UNO calling Java method writeRegistryInfo: non-UNO exception occurred: java.lang.UnsupportedClassVersionError: haui/office/uno/filter/svgimport/Component (Unsupported major.minor version 49.0)X000ajava stack trace:X000ajava.lang.UnspportedClassVersionError: ~ looks like a bunch stuff I cannot afford to type it all in by hand - more than 2000 chars of stack trace.

Ok, so I went to OpenOffice and downloaded OpenOffice 1.9.125. When I went back in it said the component was already installed. Ok, so i uninstalled it and tried reinstalling the component, and i got the same error. Anyway, after installation I tried to open an SVG document and it opened the document in the Word program ~ not in the draw program.

The Package Manager says that "draw_svg_Import.xcu" and "svg-import.jar" are both "Disabled" and there is no way to enable them !

-- DonaldGillies - 03 Sep 2005

The error with the lenghty message is due to an insufficient Java version being installed. The SVG import requires at least jre/1.5. The plugin should give a more informative error message here, sorry.

You can download Java 5 from [2] for many platforms.

The plugin should work fine with OpenOffice 1.9.113, but now, you already have 1.9.115. That's fine. This did not help, because you still had the wrong Java version installed.

-- BernhardHaumacher - 04 Sep 2005


Graphic not editable after import

Ok, so i figured out I needed batik, and managed to find it, but i struggled for an hour to install batik. I didn't realize at first that you needed to install batik with the open office package manager. after i finally got batik, and java 5.0, and svg import enabled, i find that when i open an SVG picture in open office, it appears as a single object (like a groupped object ~ that cannot be ungroupped) that cannot be split - just like it always did before !! I'm frustrated !!

-- DonaldGillies - 03 Sep 2005

To the best of my knowlege, you do not need to separately install batik, because the relevant batik classes are included in the plugin. But of cause, you need Java 5. That's the reason, why things changed upon your third attempt.

If you now open an *.svg with OpenOffice, Draw opens and displays the image, am I right? The plugin in the package manager is enabled now, isn't it? That's great, because the filter seems to work now.

The imported image should be editable in Draw. You say, you cannot ungroup the object. You clicked the object and selected "ungroup" from the context menu, but nothing happended? The reason may be that there are several levels of grouping in your SVG image. Just try to repeat the procedure several times: Select the image and select "ungroup" from the context menu, until "ungroup" is no longer available. Afterwards, you can deselect the image and select arbitrary parts thereof.

-- BernhardHaumacher - 04 Sep 2005

No SVG Insert via Insert/Picture/From File

I'm using OO.o 1.9.129 under UbuntuLinux 5.10 Breezy Badger. I installed the sun java 1.5.0_05, and it's seen under OO.o Options->OpenOffice.org->Java and it's chosen as the default (ignoring the gnu 1.4 version which comes std with Ubuntu). I then installed svg-import-r2009, which went smoothly: PackageManager reports that all three pieces are installed and enabled. I restarted OO.o (and checked ps to make sure that the process was really killed and restarted).

However, when I open a new doc and attempt to import an svg, there are two problems. I go to Insert->Picture->From File, and in the chooser menu there's no svg in the extension list, so directories that contain svgs show nothing. I got around that by naming the file directly. OO.o then gives an "unknown graphic format" message.

I tried this using svgs from the Ubuntu "Human" icon set, and some svgs of statistical graphics using pstoedit from eps files. Same results.

I started oofffice2 from the bash cmd line, but there's no helpful tracing coming out. Any ideas about what I could check next? thanks in advance, and thanks for this -- SVG *is* what we need to do for serious graphics in docs.

--

The SVG import filter only works in Draw for opening SVG graphics for editing. Try File->Open and select the graphic you want to load. This should open a new Draw window with the desired graphics loaded. If you only want to include the graphics into a writer document, you may select the whole image and transfer it with Cut&Paste from the draw window to your document.

-- BernhardHaumacher - 26 Sep 2005

Problem loading SVG image

I tried to open an SVG file in OpenOffice Draw and it is different from what we have with Inkscape. File : http://openclipart.org/clipart//computer/mouse_the_structorr_.svg.

Anyway, thx a lot for all the work that has been done with openoffice SVG package. It is now possible to use openclipart gallery in OpenOffice!

-- CyrilJacquenot - 27 Sep 2005

Thanks for this nice example! This looks really broken when imported into . The problem is due a combination of opacity and color gradients. Both are not supported well by the current filter version. It will be worthwile to check this image with the next version. Unfortunately, I will not have time to complete the improved transformation for gradients before October 25th :-).

-- BernhardHaumacher - 28 Sep 2005

I understand that you are complety full in your timetable and it's such a great thing that our requests are taken into consideration... Thx for your answer and I'll be waiting for the next version... I like openoffice and opencliparts!

-- CyrilJacquenot - 14 Oct 2005

Misplaced characters and *eps import*

I tested the import filter on a small set of .eps files converted through pstoedit (.sk) then Inkscape to .svg. All look good. Congratulations and thanks for the work. It looks like a workable fix to the nagging poor handling of vector images in OOo, at least for simple enough things like 2d scientific graphs/plots, requiring some manual edition for labelling etc...

However I found an hopefully minor glitch: text are somewhat misplaced i.e. shifted from their correct position. This can be seen using a very simple drawing made with Inkscape: a small text and some vertical and horizontal lines matching vertical and horizontal features of the text. Then import in OOo. The drawing looks fine but lines and text are offset.

NB1: I use Helvetica fonts, Inkscape-0.41-1, jre1.5.0_04, OOo 2.0 (official rpm) and svg-import-r2009.uno.zip NB2: a *work around* in Inkscape: Edit/Select all then Object/Ungroup then Path/Object to Path and save using Inkscape svg format. This can now be imported into OOo draw.

-- JacquesRoux - 01 Oct 2005


I can confirm this issue. Text placement in OpenDocument graphics is somewhat vague and needs further evaluation. Nevertheless, improved text placement is on the SVGImportTodo list.

-- BernhardHaumacher - 12 Oct 2005


Problems importing from Visio save

Slight problems importing .svg saved from MS Visio 2003 - certain entities are not displayed in Draw. The attached file presumably contains these entities, since I can re-import it into Visio and it displays as expected. The Gimp also detects the entities concerned.

-- MartinTaylor - 06 Oct 2005

Thank's for this example graphics, "slight" seems to be understatement so. Unfortunately, MS Visio uses some SVG "extensions" to encode the icons as proprietary (?) binary-encoded metafile. As replacement, only a low-resolution bitmap is provided, which is not imported by the filter.

Even if the filter would support embedded bitmaps in SVG files, the imported result would be inferior, because small bitmaps neither scale nor print well. Without enhancing the filter to also convert the embedded "metafile" to OpenDocument, there is no chance to produce acceptable results from those Visio "SVG exports".

Here is a link to some more information about Visio SVG export and import:

http://www.svgopen.org/2003/papers/SVG_Scenarios_using_Microsoft_Office_Visio_2003/

-- BernhardHaumacher - 07 Oct 2005


I understand what you're saying. Having skimmed through the MS document, I've had a look at the SVG with a hex editor, and I see where the metafiles occur. It occurs to me that these metafiles are almost certainly in WMF format, and that OOo includes code to deal with WMFs. I can well understand that you might have little interest in incorporating into your SVG filter any code to deal with non-SVG entities, but... Presumably at some point your filter code is likely to form the basis of a filter built into OOo 2.x. Would you foresee that at that time it might be possible for the filter to make use of the existing WMF filter code in order to convert the whole thing more completely to OpenDocument, as per your second paragraph above?

-- MartinTaylor - 09 Oct 2005


It would be a special pleasure for me to enable a perfect import of Visio drawings, since Draw is a direct competitor to it. I extracted a metafile from your SVG-exported Visio drawing and base64-decoded it. Unfortunately, it does not look like a plain WMF (see the attached file /Topologyanon.svg.meta Topologyanon.svg.meta). Unix file type detection reports "data", and I'm not able to load this file e.g. in Draw. Could you help unraveling those mysterious metafiles? Are you able to load the extracted metafile in any M$-Products?

-- BernhardHaumacher - 10 Oct 2005


I'm unable to open that file in MS Visio, MS Paint, Windows Picture & Fax Viewer, Gimp or Dia. One thing I notice, however, is that some Visio diagrams in my possession do open successfully as SVGs in Draw - I attach an example. It may be that the key here is in the nature of the original Visio shapes used to construct the drawing. I will see whether I can establish anything useful on this question.

-- MartinTaylor - 10 Oct 2005


Maybe, these drawings contain only bitmap icons even in the Visio source. Then, enabling bitmap import will produce a comparable drawing in . The image you attached that is imported correctly contains an embedded SVG image as replacement for the mysterious metafile. SVGs embedded in SVGs are handled correctly by the import filter.

Bitmap import is on the SVGImportTodo list.

-- BernhardHaumacher - 12 Oct 2005


r2131 is a great improvement as regards importing Visio drawings. The only major problem in this area that I see right now is that where text in a Visio text box contains returns (thus giving multiple lines of text), when imported into Draw the returns seem to be lost. The result is that text boxes end up overlaying each other on the screen, and are effectively unreadable.

-- MartinTaylor - 19 Jan 2006


Text handling is especially cumbersome in SVG, since line wrapping is not made explicit there. For that reason, MS Visio includes proprietary markup (not from the SVG name space) in the document, from which it is able to reconstruct the text layout, when reading its own exported SVG back (round-trip editing). Unfortunately, each SVG editor (e.g. Inkscape) has its own propietary markup, and I could not yet bring me to do special handling for such non-SVG markup within the filter (which would of cause produce best results).

Some details on the SVG extensions contained in Visio-exported drawings can be found here [3].

-- BernhardHaumacher - 07 Mar 2006

SVG file stays locked after import

Also the .svg file remains open in soffice.bin even after Draw has been closed, which causes problems if I re-open it using a different application. Not sure if this is a filter issue, though...

-- MartinTaylor - 06 Oct 2005


PS I confirm that SVG files stay open in soffice.bin after Draw is closed, though other types of drawing file are closed with the application. I presume that this really is a filter issue.

-- MartinTaylor - 10 Oct 2005


I can confirm this issue. Even if the file is not locked on Unix after import, there is an open file handle that stays open until is closed. I tried a quick fix, but this did not help. Therefore, it's another item on the SVGImportTodo list.

-- BernhardHaumacher - 12 Oct 2005


allow text scaling (draw:fit-to-size="true")

If an svg contains text, then that text is not scalable when imported into writer. This has also the unpleasant side effect that the image is incorrectly aligned with the page. A correctly aligned, scalable image is obtained by adding the tags

draw:auto-grow-width="false" draw:auto-grow-height="false" draw:fit-to-size="true"

to the text frame style.


-- Gerd - 09 Dec 2005

PS: I only found an edit button at the top  ;-)


Topologyanon.svg MS Visio drawing exported to SVG.

Topologyanon.svg.meta Extracted and base64-decoded metafile embedded in Topologyanon.svg

Network20041207.svg

Installing SVG and Java 1.5

I've installed the SVG filter into the Novell Version of OpenOffice 2.0 that came with SuSE 9.3. There were some minor problems.

First SuSE 9.3 comes with Java 1.4.2, so to install the new filter I needed to download version 1.5.0. I found that the java.sun.com site (given above) had information on installing the system (see http://java.sun.com/j2se/1.5.0/jre/install-linux.html), but to actually download java 1.5 it is necessary to go to www.java.com.

Second was the question of where to unpack the distribution. SuSE places java 1.4 under /usr/lib/jvm. For files which are not part of the main distribution the Filesystem Hierarchy Standard recomends /usr/local. I created a directory java under this and installed java 1.5 there. OpenOffice then found the distribution there without any problem.

I downloaded the SVG filter file svg-import-v2131.uno.zip, but then made the error of unzipping the file before adding the macros to OpenOffice. Each of the three macro files then has to be added separately for the system to work. A better method, which OpenOffice supports, is to import the whole zip file.

Took a bit of time but the result is really worthwhile. Thanks guys.

-- David Webb - 7th January 2006

p.s. All I need now is a way of directly importing ps and eps files which allows me to edit individual lines within OpenOffice.

Problem with the 'path' operator

I have found what looks like a rounding error when processing the path operator. The following svg file plots a box of width 77.6 and a path made up of 100 segments each with an x-coordinate step of 0.776. Thus the path should lie within the box. When imported into OpenOffice it is found to extend beyond the right hand side of the box.

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" [ <!ENTITY ns_svg "http://www.w3.org/2000/svg"> ]>
<svg width="400" height="100" viewBox="0 0 400 100" overflow="visible" enable-background="new 0 0 400 100" xml:space="preserve">
<path fill="none" stroke="#000000" stroke-miterlimit="10" d="M10.000,5.000v80.000h77.60V5.000H10.000"/>
<path fill="none" stroke="#000000" stroke-miterlimit="10" d="M10.000,40.000
l0.776,0.200l0.776-0.200l0.776,2.432l0.776,3.070l0.776,4.663
l0.776-5.669l0.776-5.786l0.776-0.143l0.776-1.883l0.776,1.617
... Two lines together containing 10 coordinate pairs repeated 9 more times ...
"/>
</svg>

-- David Webb - 12th January 2006

Bugs Fixed

The above problem has now been fixed (SVG Filter revision 2158). It arose because Open Office transforms all co-ordinates. including increments, into an integer number of 0.01 mm units. The above x-increments transform to 20.53 OpenOffice units which is rounded up to 21. In a time series plot of 1000 points this produces an error of nearly 5mm! The workaround is to carry out the increment arithmetic within the filter and to replace all increment co-ordinates by absolute co-ordinates in the file passed to OpenOffice.

An unrelated problem associated with 90 degree clockwise transformations has also been fixed. One effect of the bug was to always write a y-axis title so that it read from top to bottom. Thanks to Bernhard for implementing the changes.

-- David Webb - 9th February 2006

The fixes are now available officially for download in revision 2185 of the filter, which you can grep from the download page.

-- BernhardHaumacher - 04 Mar 2006


SVG filter on Mac OS X

I have been able to add the import filter into OOo 2.0.1 on Mac OS X 10.4.3 with JRE 1.5.0. Some preliminary findings are below.

  • Experiments with SVG exported from OmniGraffle have been less than promising, but I'm still tinkering...
    • OG file export to SVG and OOo import of a fairly simple OG flowchart was taking forever (killed process)
    • OG graphics imported to OOo are not in nearly the same proportion I see on the screen in OG... Much bigger.
    • Hopefully this link works... File:OG4 High Level Process Map v2.svg The wiki didn't seem to like the SVG attachment.
  • Inkscape seems to work OK, but there are some quirks:
    • Unexpected shape sizes (again, much bigger)
    • Unexpected page borders for the canvas (probably a setting in Inkscape I need to find)
    • etc...
  • I ran some very limited, quick tests with Open Clip Art SVG files and things worked well.

I will post more when time allows.

Thanks to the developer and everyone helping improve this utility.

--EJ 10:09, 20 January 2006 (CET)


Website locked down?

I tried to find your SVG Import Filter, but I doesn´t have permission to enter the website: http://www.ipd.uka.de/~hauma/svg-import/ --MilesTeg 19:23, 31 January 2006 (CET)


Tricky polyline

I've got wrong results when importing files with only two points polylines. If I convert them to line tags, then everything is ok (see the green line in my sample file). Polylines with more than two points imported ok though.

You can download my test file from http://personales.upv.es/misan/test.svg.

Two-point polylines are somehow compressed to the left margin, while others are ok. Inkscape shows the right image. SVG code was generated by a custom-made Java program. I've a very limitted knowledge of SVG, so it might be caused by my faulty code ...

-- Misan - 09 January 2006

Thanks Misan for pointing out this issue. It is fixed in revision 2185, which you can grep from the download page.

-- BernhardHaumacher - 04 Mar 2006


Shared installation

Quicky not to remind users that they can install this package for all users from the commandline using /opt/openoffice.org2/program/unopkd add --shared <path_to>/svg-import-r<current>.uno.zip

Works like a charm.


General input/output error.

I'm using FC5 and installed java 1.5.0_06 and selected that in tools/options/java. I then installed svg-import-r2185.uno.zip via tools/package manager. If I do a file/open on firewall_denco_01.svg I get a new window (Draw?) with a dialog titled "OpenOffice.org 2.0" with "General Error. General input/output error.". I get the same if I do insert/object/OLE Object/Create from file of the same file. Any help would be appreciated.

probale solution for this problem

I got the same problem here. After starting OpenOffice from the commandline I got the following error message:

java.lang.UnsatisfiedLinkError: /opt/sun-jre-bin-1.5.0.06/lib/i386/libawt.so: libmlib_image.so:
Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(Unknown Source)
        at java.lang.ClassLoader.loadLibrary(Unknown Source)
        at java.lang.Runtime.loadLibrary0(Unknown Source)
        at java.lang.System.loadLibrary(Unknown Source)
        at sun.security.action.LoadLibraryAction.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.awt.NativeLibLoader.loadLibraries(Unknown Source)
        at sun.awt.DebugHelper.<clinit>(Unknown Source)
        at java.awt.Cursor.<clinit>(Unknown Source)
        at org.apache.batik.bridge.CursorManager.<clinit>(CursorManager.java:76)
        at org.apache.batik.bridge.BridgeContext.<init>(BridgeContext.java:1081)
        at org.apache.batik.bridge.BridgeContext.<init>(BridgeContext.java:277)
        at haui.xml.svg.SVGBuilder.completeLoading(SVGBuilder.java:72)
        at haui.xml.svg.SVGBuilder.loadDocument(SVGBuilder.java:63)
        at haui.office.uno.filter.svgimport.SVGImportService.importer(SVGImportService.java:75)

For me the following solution worked just fine:

ln -s /opt/sun-jre-bin-1.5.0.06/lib/i386/libjava.so /lib
ln -s /opt/sun-jre-bin-1.5.0.06/lib/i386/libmlib_image.so /lib
ldconfig

Note: depending on the policy of you distribution, you might have to create the symlinks in /usr/lib or /usr/local/lib

Note: This solution is rather simple, since Java is just not able to find it's own libraries. Another solution might be to add the library-path of java (/opt/sun-jre-bin-1.5.0.06/lib/i386) to the systemwide /etc/ld.so.conf and just do ldconfig.

Gentoo 2006.0, gcc-3.4.6, sun-java 1.5.0.06, OpenOffice.org 2.0.2 (binary version, not natively compiled), svg-import-r2185.uno.zip and german localisation.

--Justonce 17:44, 13 July 2006 (CEST)

Me too

- Confirming the same error with Gentoo Linux, sun-java 1.5.0_06, OpenOffice.org 2.0.2 (binary version, not natively compiled), and svg-import r2185.

Here is the stacktrace I saw an oodraw2's stderr output:

java.lang.UnsatisfiedLinkError: /opt/sun-jre-bin-1.5.0.06/lib/i386/libawt.so: 
  /opt/sun-jre-bin-1.5.0.06/lib/i386/libawt.so: symbol j2d_mlib_ImageCreate,
  version VER_1.1 not defined in file libmlib_image.so with link time reference
	at java.lang.ClassLoader$NativeLibrary.load(Native Method)
	at java.lang.ClassLoader.loadLibrary0(Unknown Source)
	at java.lang.ClassLoader.loadLibrary(Unknown Source)
	at java.lang.Runtime.loadLibrary0(Unknown Source)
	at java.lang.System.loadLibrary(Unknown Source)
	at sun.security.action.LoadLibraryAction.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.awt.NativeLibLoader.loadLibraries(Unknown Source)
	at sun.awt.DebugHelper.<clinit>(Unknown Source)
	at java.awt.Cursor.<clinit>(Unknown Source)
	at org.apache.batik.bridge.CursorManager.<clinit>(CursorManager.java:76)
	at org.apache.batik.bridge.BridgeContext.<init>(BridgeContext.java:1081)
	at org.apache.batik.bridge.BridgeContext.<init>(BridgeContext.java:277)
	at haui.xml.svg.SVGBuilder.completeLoading(SVGBuilder.java:72)
	at haui.xml.svg.SVGBuilder.loadDocument(SVGBuilder.java:63)
	at haui.office.uno.filter.svgimport.SVGImportService.importer(SVGImportService.java:75)

Maybe java 1.5.0_06 is broken?

Same here

  • Windows XP Home SP2 - Java Version 1.5.0 (build 1.5.0_06-b05)
  • OpenOffice 2.0.2 Dutch - svg-import-r2185.uno.zip

MarQ 00:46, 13 April 2006 (CEST)


Added a warning on the download page. I'll investigate that problem. Until it's fixed, please try to use a more "dated" Java 5 release.

Haui 09:27, 14 April 2006 (CEST)


I cannot reproduce this problem on Ubuntu 5.10 with OpenOffice.org 2.0.2 and Java version 1.5.0_06-b05. Could somebody, who experiences this problem please send me the source SVG file that causes the problem?

Haui 14:29, 16 April 2006 (CEST)


I have it with all SVG files, such as:
http://openclipart.org/clipart//education/otto_01.svg
Up to now, I never got one SVG file opened.
MarQ 12:22, 17 April 2006 (CEST)


I'm sorry for that. The filter is currently able to read about 6000 of the 8117 images of OpenClipart.org. Therefore, there is some probability to choose those that do not work. Most of the images, which the filter is not able to process, are in some way broken (because the SVG is invalid). Unfortunately, the only error message that the filter is able to communicate is "General I/O Error". This is not much help figuring out what's wrong. However, if you start OpenOffice.org on the command line (at least on a unixoid operation system), you get an error printed at the console, which explains where the problem is. In your example above (http://openclipart.org/clipart//education/otto_01.svg), the message reads:

org.w3c.dom.DOMException: The current document is unable to create an element of the 
    requested type (namespace: http://www.w3.org/2000/svg, name: author).
        at org.apache.batik.dom.AbstractNode.createDOMException
            (AbstractNode.java:403)
        at org.apache.batik.dom.svg.SVGDOMImplementation.createElementNS
            (SVGDOMImplementation.java:210)
        at org.apache.batik.dom.svg.SVGOMDocument.createElementNS
            (SVGOMDocument.java:329)
        at org.apache.batik.dom.util.SAXDocumentFactory.startElement
            (SAXDocumentFactory.java:605)
        ...

This means that this document contains an invalid/unknown/fake/imaginary SVG element called "author". I don't know, who uploads this host of intentionally broken images to openclipart.org... however, if you open this broken file in a text editor and if you delete the line 51 that reads

    <author date="29-08-2004" id="author987" name="Alexandro Colorado" nick="JZA"/>

then the filter is able to process the image, and it opens in OOo without further complaints. OK, the text has blue background but besides that...

Haui 22:07, 18 April 2006 (CEST)


I tested both, Ubuntu Linux and Windows XP Home with Java Version 1.5.0 (build 1.5.0_06-b05) and both work well. Maybe, this is a Gentoo-specific problem. Any other systems with the same stack trace? (Not the General I/O error, because this is the only one the filter reports - even if the SVG cannot be read, because it is broken in some way).

Haui 22:45, 21 April 2006 (CEST)


I wonder if this results from SVG files created from Inkscape? I am using OOo 2.0.2 on Windows XP SP2 with jre 1.5.0_06-b05. There is no 'author' line in my XML. I have tried saving the file as an 'Inkscape SVG' and also as a 'Plain SVG,' but both of them give me the same 'General input/output error' when I try to open them.

Jeng 6/20/2006


I use Inkscape 0.44.1 and OOo 2.1 on a PC with Windows XP Professional . I get the "General Error" on any SVG file created with Inkscape that contains text frames. The offending SVG tag is <flowRoot> --- I could not open any SVG document containing this tag, even when it was completely empty. I guess the SVG import tool does not yet support flows. You wish it would at least handle them gracefully.

A simple workaround is to avoid text frames. In Inkscape, you can click on your text frame and choose Text->Unflow to "un-frame" it. (You could also choose Path->Object to Path, but then you won't be able to edit the Text in OpenOffice, of course.)

You can now save your file as Inkscape SVG or Plain SVG, and it should open in OpenOffice Draw just fine. But beware of "invisible" <flowRoot> tags resulting from empty text frames that might be left in your document. You may need to open the SVG file in a text editor and manually delete the tag (up to the matching </flowRoot>).

Jens 18:00, 24 Jan 2007 (PST)

Problem with text position in Geonext generated SVG.

I had a test on SVG generated by Geonext, and the points names are positionned ugly above the points, where firefox show them correctly shifted.


Hi Yves, could you please provide a small example SVG file created with Geonext? This would help in tracking down the problem.

Haui 10:47, 8 April 2006 (CEST)

Here is one file générated by Geonext.

Update: not completly fixed (r2185)

I have just tested with r2185 version (svg-import-r2185.uno.zip). The text position looks better.

There is two bugs:

  1. Some text should be masked. It's not.
  2. The text appears with light blue background. Should not.

the tested file. the screenshot with the bugs

Blue background for all text elements

When I open an svg file in openoffice draw, all the text elements have a light blue background. This happened after I upgraded to openoffice 2.0.2 today; it worked fine in 2.0.1. I can fix it by left clicking to select a text element, then right clicking and choosing Edit Style... and then selecting White from the Area menu. E.J. Neafsey

Ditto. Had this problem importing an SVG file created by matplotlib under Python. The same file opens just fine in InkScape. Derek.

Can't load SVG tool

I am attempting to load the SVG import tool through the Package manager in OO Draw. The file I am attempting to load as an open-office package is svg-import-r2185.uno.zip. I am running Windows XP with Service Pack 2, over 50GB of free disk space, 512 MB of memory, OpenOffice.org version is 2.0.3 I get the following error message (from screen capture):


SVG error.PNG


Any help will be appreciated. Rfc1394 04:59, 17 July 2006 (CEST)


You do not have a Java 5 (Java 1.5.X) version registered with our OpenOffice installation. Please check Tools/Options/Java and select a Java 1.5 runtime environment (after installing one from e.g. http://java.sun.com/javase/downloads/index.jsp by clicking "Java Runtime Environment (JRE) 5.0 Update 7" there). Haui 22:43, 27 July 2006 (CEST)

Image results in blank document

I attempted to import this image: http://openclipart.org/clipart//computer/network_could_nicolas_cl_.svg It resulted in a blank document. I'm running OO.o 2.0.1/Java 1.5.0-06 on Mandrake 10.2. R2185 of the filter. Filter working well for other images imported so far.

Ian Gibbs 12:49, 07 August 2006 (BST)

Cannot download the SVG filter

Apologies for posting this here. I see no other option (I can't get Bernhard's email). The download link (http://haumacher.de/svg-import/) doesn't seem to work. I think the server is down. If Bernhard reads this message - please check why access to the website is impossible. Thanks!

---

Must have been a temporary server outage. Sorry for that. The plugin is still online. BTW, my e-mail address can be found at my user page (Haui) in this wiki.

Haui 22:16, 11 October 2006 (CEST)

Non-deletable (?) black page frame after import

I've opened a svg-file with OpenOffice Draw and the resulting document has page dimensions of 30x12cm, which is slighty smaller than the area covered by all the contents of the page. That's why I put in larger values for the page-dimensions, but after that, there is still one black frame/box with the original dimensions remaining, which also appears on printouts.

I found no way, how to get rid of this frame. Ideas anyone? Might also be some simple feature of OpenOffice that I don't know of.

Btw, I also get the blue background text boxes mentioned above.

I'm using OpenOffice 2.0.3 with Java 1.5.0_06 on WinXP

Carstensis 14:09, 24 October 2006 (EET)

I cannot import the drawing itself, I can only see the xml code instead

I've downloaded the SVG import filter, then installed it with the Package Manager. I'm using Ubuntu Dapper, with OOo 2.0.2, and JRE from Java, v. 1.5.0_06. Still, I cannot open the svg file. When I try, a Writer doc opens with the svg in xml format, instead. Anyone can help me?

Thanks in advance.

celiapgt 13:36, 1 February 2007 (GMT)

Installation of the svg import package v2185 under Windows 98 fails during the activation of the .jar code ("Could not create Java implementation loader"). OOo 2.1, JRE 1.5.0_11.

--dean 17:29, 6 March 2007 (CET)


Same problem here. WinXP SP2 Home, OOo 2.2, JRE 1.6.0 (which was apparantly installed by OOo 2.2)

-- Walt 09:30 30-Mar-07


Weird Java Error

I tried to install the package few time but got the same error every time. I know for sure that I have JAVA 5.0 because I am a J2EE developer and we use JDK 1.5.0_06 for development. My openoffice version is 2.0.

The error I get is :

(com.sun.start.lang.DisposedException) {{{Message = "URP_Bridge : disposed\X000a(tid=18) Unexpected connection closure", Context = (com.sun.star.uno.XInterface) @0}}}.

Oh BTW, this is on Debian Linux.

Screenshot-Package Manager.png

Personal tools