There are several reasons why EchoSVG is not a drop-in replacement for Apache Batik:
-
Avoid using Apache Software Foundation package names and trademarks.
-
Improved conformance to the SVG and CSS specifications.
-
Better user experience (e.g. the
codec
-transcoder
merge). -
A circularity with Apache FOP. To render PDF images, Batik uses FOP which in turn uses Batik, so depending on FOP would imply mixing EchoSVG and Batik. See issue #10.
-
Changes in the Java™ Platform.
To migrate from Apache Batik, you generally have to deal with the following:
-
Package names are now prefixed by
io.sf.carte.echosvg
instead oforg.apache.batik
. -
Class names that included the name "Batik" now have "EchoSVG".
-
The
codec
andtranscoder
modules were merged into one. See issue #11. -
Tcl and Python 2.x scripting was removed (see issues #12 and #13). That scripting wasn't functional in Batik anyway.
-
The generic
rasterizer
module (and related files) was removed (svgrasterizer
is still available but no longer supports PDF graphics). See issue #10 for more details. -
SAXDocumentFactory
andSAXSVGDocumentFactory
no longer have constructors withString
arguments. Either remove the string argument or replace it by anull
and you should be fine. Alternatively, you can now use your ownXMLReader
in place of the parser class name. (The API change was made for security reasons) -
EchoSVG does not depend on
xml-apis-ext-1.3.04.jar
to provide the SVGOM and SMIL APIs (see #15). Ifxml-apis-ext
happens to be in your modulepath, you could configure an exclusion for it (in Maven or Gradle), then usesvgom-api
andsmil-api
from the Web APIs project instead. If your project requires the old SAC api which is provided byxml-apis-ext
as well, you can usesac.jar
as a replacement. -
EchoSVGSecurityManager
is deprecated for removal due to Security Manager API being deprecated for removal since Java 17. Similarly,RhinoClassLoader.getAccessControlContext()
and other security-related methods in other classes are deprecated for removal as well. The constructorApplicationSecurityEnforcer(Class, String)
is no longer public, please useApplicationSecurityEnforcer.createSecurityEnforcer(Class, String)
instead. -
BridgeContext
(in thebridge
module) gained aclose
method. -
SVGAnimationElementBridge.initializeAnimation()
gained aBridgeContext
argument and now returns aboolean
.