Hi all,
this issue was not closed: moving to newer batik broke SVG export for both
embedded OpeJUMP "Export view" and CadPlan Printer view plugin.
I was thinking that 16 jar files and 2.6 Mb (Apache NBatiks)  was a large
amount if we consider that these libraries are only used for 3 plugins.
I found this page http://www.object-refinery.com/blog/blog-20140423.html
where  Batik lib vs JFreeSVG libraries are compared. And I realize that:
a) we possibly don't need all Batik classes. According to the page only
these file are needed:

   - batik-dom.jar (173,750 bytes);
   - batik-svggen.jar (215,802 bytes);
   - batik-awt-util.jar (403,287 bytes);
   - batik-util.jar (128,334 bytes);
   - batik-ext.jar (10,261 bytes);
   - batik-xml.jar (30,862 bytes)

For around 1 Mb

b) Is there a way to migrate to JFreeSVG? I realize that we use Apache
Batik only to export to SVG
Batik classes are involved in these classes:

-Export objects to SVG

   - SaveImageAsPlugIn
   - SaveVImageAsSVGPlugIn <currently deactivated as SaveImageAsPlugIn
   exports to SVG)
   - AdditionalResultIO

-Read SVG files to use as symbology

   - BitmapVertexStyle


   - StyleSheetStyleHandler, which seems not related to any process into
   OpenJUMP

Peppe

Il giorno mer 5 ago 2020 alle ore 15:19 <edgar.sol...@web.de> ha scritto:

> hey All,
>
> had to touch batik, as it was missing some classes in trunk/lib/batik.jar
> after Peppe added AdditionalResultsIO. maven already had the proper batik
> components defined that's why the snapshot builds went fine.
>
> while at it i noticed that we were using a quite old batik version and
> upgraded it. looks good to me but please test and come back if something
> breaks horribly.
>
> sunshine all over.. (sweating) ede
>
> -------- Forwarded Message --------
> Subject: [JPP-Devel] SVN: [6369] core/trunk
> Date: Wed, 05 Aug 2020 12:50:50 +0000
> From: jump-pilot-svn--- via Jump-pilot-devel <
> jump-pilot-devel@lists.sourceforge.net>
> Reply-To: OpenJump develop and use <jump-pilot-devel@lists.sourceforge.net
> >
> To: jump-pilot-devel@lists.sourceforge.net
> CC: jump-pilot-...@lists.sourceforge.net
>
> Revision: 6369
>           http://sourceforge.net/p/jump-pilot/code/6369
> Author:   edso
> Date:     2020-08-05 12:50:49 +0000 (Wed, 05 Aug 2020)
> Log Message:
> -----------
> upgrade batik to latest greatest v1.13
> minimal fixup of AdditonalResultsIO
> fingers crossed, let's see if it breaks something more
>
> Modified Paths:
> --------------
>     core/trunk/pom.xml
>
> core/trunk/src/org/openjump/sextante/gui/additionalResults/AdditionalResultsIO.java
>
> Added Paths:
> -----------
>     core/trunk/lib/batik-all-1.13.jar
>
> Removed Paths:
> -------------
>     core/trunk/lib/batik-all.jar
>
> Added: core/trunk/lib/batik-all-1.13.jar
> ===================================================================
> (Binary files differ)
>
> Index: core/trunk/lib/batik-all-1.13.jar
> ===================================================================
> --- core/trunk/lib/batik-all-1.13.jar   2020-08-05 12:45:12 UTC (rev 6368)
> +++ core/trunk/lib/batik-all-1.13.jar   2020-08-05 12:50:49 UTC (rev 6369)
>
> Property changes on: core/trunk/lib/batik-all-1.13.jar
> ___________________________________________________________________
> Added: svn:mime-type
> ## -0,0 +1 ##
> +application/octet-stream
> \ No newline at end of property
> Deleted: core/trunk/lib/batik-all.jar
> ===================================================================
> (Binary files differ)
>
> Modified: core/trunk/pom.xml
> ===================================================================
> --- core/trunk/pom.xml  2020-08-05 12:45:12 UTC (rev 6368)
> +++ core/trunk/pom.xml  2020-08-05 12:50:49 UTC (rev 6369)
> @@ -924,25 +924,25 @@
>          <dependency>
>              <groupId>batik</groupId>
>              <artifactId>batik-awt-util</artifactId>
> -            <version>1.6</version>
> +            <version>1.13</version>
>              <scope>compile</scope>
>          </dependency>
>          <dependency>
>              <groupId>batik</groupId>
>              <artifactId>batik-dom</artifactId>
> -            <version>1.6</version>
> +            <version>1.13</version>
>              <scope>compile</scope>
>          </dependency>
>          <dependency>
>              <groupId>batik</groupId>
>              <artifactId>batik-svggen</artifactId>
> -            <version>1.6</version>
> +            <version>1.13</version>
>              <scope>compile</scope>
>          </dependency>
>          <dependency>
>              <groupId>batik</groupId>
>              <artifactId>batik-squiggle</artifactId>
> -            <version>1.6</version>
> +            <version>1.13</version>
>              <scope>compile</scope>
>          </dependency>
>          <dependency>
>
> Modified:
> core/trunk/src/org/openjump/sextante/gui/additionalResults/AdditionalResultsIO.java
> ===================================================================
> ---
> core/trunk/src/org/openjump/sextante/gui/additionalResults/AdditionalResultsIO.java
> 2020-08-05 12:45:12 UTC (rev 6368)
> +++
> core/trunk/src/org/openjump/sextante/gui/additionalResults/AdditionalResultsIO.java
> 2020-08-05 12:50:49 UTC (rev 6369)
> @@ -27,7 +27,7 @@
>  import javax.swing.tree.TreePath;
>  import javax.xml.namespace.QName;
>
> -import org.apache.batik.dom.svg.SVGDOMImplementation;
> +import org.apache.batik.anim.dom.SVGDOMImplementation;
>  import org.apache.batik.svggen.SVGGraphics2D;
>  import org.apache.log4j.Logger;
>  import org.math.plot.PlotPanel;
> @@ -37,7 +37,7 @@
>  import org.openjump.core.ui.util.LayerableUtil;
>  import org.openjump.sextante.core.ObjectAndDescription;
>  import org.w3c.dom.DOMImplementation;
> -import org.w3c.dom.svg.SVGDocument;
> +import org.w3c.dom.Document;
>
>  import com.vividsolutions.jump.I18N;
>  import com.vividsolutions.jump.feature.FeatureCollection;
> @@ -401,7 +401,7 @@
>                 // Get a SVGDOMImplementation and create an XML document
>                 DOMImplementation domImpl =
> SVGDOMImplementation.getDOMImplementation();
>                 String svgNS = "http://www.w3.org/2000/svg";;
> -               SVGDocument svgDocument = (SVGDocument)
> domImpl.createDocument(svgNS, "svg", null);
> +               Document svgDocument = domImpl.createDocument(svgNS,
> "svg", null);
>
>                 // Create an instance of the SVG Generator
>                 SVGGraphics2D svgGenerator = new
> SVGGraphics2D(svgDocument);
>
>
>
> _______________________________________________
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
>
> _______________________________________________
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to