Unsupported SVG Features
| SVG Import|
The SVG features mentioned on this page are currently not supported. For some, there are good reasons why the import filter cannot handle them, some were just considered less important. If your SVG graphic uses these features, they are silently ignored and your imported graphic may look "somewhat broken".
- 1 General note
- 2 Stroke opacity
- 3 Embedded images (image)
- 4 Special text (textPath / a / tref / tspan)
- 5 Patterns and line dashing
- 6 Clipping (clipPath / mask)
- 7 Other funny stuff
- 8 Known Bugs
SVG and what's named SVG-compatible in OpenDocument is really different. Therefore, the import filter can only approximate the SVG contents. In case of doubt, the approximation accepts visual differences for preserving editability. If you fell that your SVG document was not processed correctly, please also check the SVGSupportedFeatures section for potential restrictions.
Due to Issue:42959, this is disabled in the current version of the filter. Strokes are always imported fully opaque.
Since Issue:42959 is fixed in current builds of , the upcoming version of the import filter will enable the import of stroke opacity.
Embedded images (image)
Images (e.g. bitmaps) that are referenced from the imported SVG graphic are not imported into .
I consider this less important, because embedded low-resolution bitmaps produce inferior results when being scaled or printed.
The OpenDocument format supports embedding images even in its flat-XML flavor produced by the SVG import filter. The binary coded data must therefore be embedded within a office:binary-data element. This of cause results in increased file sizes, if the SVG file links to the same image multiple times, because each copy is embedded (by value) in the resulting document.
Special text (textPath / a / tref / tspan)
Needs further evaluation.
Patterns and line dashing
Needs further evaluation.
When the image contains pattern fills, this currently breaks the import. The filter fails with a "General input/output error" and nothing is imported.
Clipping (clipPath / mask)
Clipping is not supported by OpenDocument. The only workaround is to pre-clip graphics elements during import. This workaround requires a set of "algebraic" operations on primitive graphic elements (like the intersection and subtraction of shapes as implemented in Draw). Even if this seem to be challenging, the resulting graphics will become less editable.
Clipping is currently not implemented in the import filter. If your SVG graphics relies on clipping, you will see primitive graphics elements in the imported result that are "somewhat to large".
Other funny stuff
Descriptive elements, embedded fonts, filters, animation, color profiles, cursors, foreign objects, scripting, switch and view is silently ignored.
Apart from descriptive elements, which should be translated into named graphics objects, I consider this of no relevance for Draw applications.
Fixed in version r2009: Loading of documents fails, if width and height attributes are missing on the top-level svg element.
In that case, a Java:java/lang/NullPointerException is displayed in the console window, from where was invoked and the loading fails with a general input/output error. You can add the missing attributes in a text editor and try again to import the graphics.
The exception reads as follows:
java.lang.[[Main_NullPointerException|NullPointerException]] at org.apache.batik.dom.svg.[[Main_AbstractSVGLength|AbstractSVGLength]]$[[Main_DefaultContext|DefaultContext]].get[[Main_ViewportWidth|ViewportWidth]] at org.apache.batik.parser.[[Main_UnitProcessor|UnitProcessor]].percentages[[Main_ToPixels|ToPixels]] at org.apache.batik.parser.[[Main_UnitProcessor|UnitProcessor]].svg[[Main_ToUserSpace|ToUserSpace]] at org.apache.batik.dom.svg.[[Main_AbstractSVGLength|AbstractSVGLength]].getValue at haui.xml.svg.[[Main_DefaultUserAgent|DefaultUserAgent]].get[[Main_ViewportSize|ViewportSize]] at org.apache.batik.bridge.[[Main_UserAgentViewport|UserAgentViewport]].getWidth ... at org.apache.batik.bridge.[[Main_UnitProcessor|UnitProcessor]].svg[[Main_LengthToUserSpace|LengthToUserSpace]] at org.apache.batik.bridge.[[Main_UnitProcessor|UnitProcessor]].svg[[Main_HorizontalLengthToUserSpace|HorizontalLengthToUserSpace]] at org.apache.batik.bridge.[[Main_SVGSVGElementBridge|SVGSVGElementBridge]].create[[Main_GraphicsNode|GraphicsNode]] at org.apache.batik.bridge.GVTBuilder.build at haui.xml.svg.SVGBuilder.completeLoading at haui.xml.svg.SVGBuilder.loadDocument at haui.office.uno.filter.svgimport.[[Main_SVGImportService|SVGImportService]].importer
Problem with running the latest r2131 on Linux JDK 1.5.0_06
This maybe a platform specific issue, but I'm afraid I don't have the know-how to handle this on my own, and just wanted to give You a heads up. When trying to open an SVG file using the r2131 build I get the following exception:
java.lang.UnsatisfiedLinkError: /usr/java/jdk1.5.0_06/jre/lib/i386/libawt.so: libmlib_image.so: cannot open shared object file: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50) at java.security.AccessController.doPrivileged(Native Method) at sun.awt.NativeLibLoader.loadLibraries(NativeLibLoader.java:38) at sun.awt.DebugHelper.<clinit>(DebugHelper.java:29) at java.awt.Cursor.<clinit>(Cursor.java:167) 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:54) at haui.xml.svg.SVGBuilder.loadDocument(SVGBuilder.java:45) at haui.office.uno.filter.svgimport.SVGImportService.importer(SVGImportService.java:57)
WORKAROUND: Using package manager uninstall and reinstall the svg-import package and You should be able to use the tool for an instance of openoffice running. After restarting openoffice, the plugin once again doesn't work. As far as I remember, this wasn't a problem on older versions (running on the same platform).
-- BernhardHaumacher - 18 Aug 2005
I think it's a problem of java not beeing able to find its own libraries. On my system (Gentoo 2006.0, openoffice-2.0.2-bin, svg-import-r2185.uno.zip) the following commands fixed this problem. (see also SVG_User_Experiences#General_input.2Foutput_error.)
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
--Justonce 11:05, 14 July 2006 (CEST)