12 April 2014: The OpenOffice Wiki is not, and never was, affected by the heartbleed bug. Users' passwords are safe and wiki users do not need take any actions.

Unsupported SVG Features

From Apache OpenOffice Wiki
Jump to: navigation, search
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


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".

General note

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.


Stroke opacity

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.

Known Bugs

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)

Personal tools