Dear Steve,

On 1/16/25 14:05, Steve Litt wrote:
Martin Goik said on Wed, 15 Jan 2025 14:36:00 +0100

Hello,

The Xmlmind distribution includes the Apache Batik Plugin  for
rasterizing SVG images.

However I'm using Inkscape for SVG image creation. Unfortunately
Inkscape sometimes creates non-standard conformant SVG code. This code
does not cause any trouble with current browsers but Batik being very
picky frequently throws exceptions making Xmlmind image rendering a
pain.
[snip]

I'm pretty sure that if, when you save your Inkscape file, you save it
as Plain SVG instead of Inkscape SVG, you won't have this problem. Of
Thanks for your advice in the first place! Using Inkscape for ages I was unaware of this option. More precisely: I did not expect to find something helpful in that menu other than e.g. exporting LaTeX or whatever non-SVG format being desired.

However your proposal does not solve my issue. One of the culprits causing trouble was this SVG file https://gitlab.mi.hdm-stuttgart.de/goik/GoikLectures/-/blob/master/Doc/Sd1/Inheritance/Fig/figureCenter.svg . So I loaded it into Inkscape and saved it as plain SVG. Both current Xxe 10.10 and batik-squiggle 1.14 throw a org.apache.batik.transcoder.TranscoderException . Similar files in that very same folder are being Batik rendered flawlessly for no apparent reason.

I then saved it again as plain SVG this time ticking the »Export as SVG 1.1 ...« box to no avail.

The file had been created July 2022 thus likely by an older Inkscape version. My current Inkscape is 1.4 (e7c3feb100, 2024-10-09).
course this means you must not use any Inkscape extensions to SVG,
including multiline text. For multiline text I just make an x, give it
the desired justification and right position, Ctrl+D it and move the
copy straight down, then use Inkscape's Distribute to create the
desired number of lines.

So far I'm not aware of using any non-standard SVG features in this file (But I likely do so anyway). In particular I do not see multi line text being present.

I narrowed down the problem ending up with just a single arrow causing the exception, see attached arrow.svg. This one also had had been saved as plain svg. I'm aware of (older?) Inkscape handling arrowheads strangely. But my SVG knowledge is just insufficient.

I then created a new Inkscape file from Scratch drawing just a straight line subsequently adding an arrow marker getting a very same result. Using Oracle JRE instead doesn't change anything. I feel like missing something terribly obvious.

BTW: Its not that I'm desperately searching for exotic examples causing trouble. Over the years I had had numerous related issues of this kind. For example when exporting UML Diagrams from Jetbrains IDE and embedding these into Inkscape. Sometimes the exceptions being thrown lead to a clue. I then edited the SVG by hand typically removing or modifying some attributes or element nodes. I could still edit the results in Inkscape keeping Batik happy at the same time. But this process is ways to cumbersome, unsafe and obviously kills productivity.

Martin

--
Martin Goik  Tel.  +49-711-8923-2164http://www.HdM-Stuttgart.de/~goik

For there is no folly of the beast of the earth which is not infinitely
outdone by the madness of men.                          Herman Melville
--
XMLmind XML Editor Support List
xmleditor-support@xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to