Thanks. I'll add a vote to the bug.

I agree that it's more than minor, because it basically means I can't import SVGs.


-------- Original Message --------
On 11 Sep 2019, 22:41, Oskar Berggren <> wrote:

Batik bug since 2015:

Sometimes coincidences are ridiculous... I discovered the existence of this problem only yesterday and tried to bring some attention to it:

Den ons 11 sep. 2019 kl 21:09 skrev Samuel Penn <>:
Hi all,

I have a document which imports an SVG as a full page graphic. It used to display fine, but recently I started having problems with it. The problems started after I recently edited the image in Inkscape (it's been unchanged for a couple of years). Since the image was created in Inkscape, and has only ever been edited in Inkscape, I'm not sure why it's started having problems now.

I'm using FOP 2.3 on Ubuntu 18.04, with Java 11.0.4

The first issue was that the image was displayed at the wrong size - it was resized so only the top left quarter of the image was displayed (but sized to fill the entire page). I've tracked this down to a change in how Inkscape is setting the page width and height in the document. It used to specify (according to my gitlab history):
Inkscape recently changed things to:

Since it's an A4 page (210mm x 297mm), the change seems perfectly reasonable, but FOP doesn't seem to like it. Changing the units back to the unitless values seems to have fixed that, so this issue is more a curiosity than a problem for me at the moment.

The bigger issue is that FOP has stopped rendering styles on some graphics. This seems to be mostly limited to text styles - colours and border styles. Even if I convert the text to a path, then it is still displayed as flat colour. I've put some examples of the problem I'm seeing, along with a cut down FO file, here:

with-styles.png shows how the image should look (and does look in Inkscape)
no-styles.png shows how the image is rendered by FOP when it's converted to a PDF.

I've also included the SVG file, generated PDF and my fop.conf file.
The SVG includes the font Archivo Black (which is referenced in the fop.conf), but I see the problem with standard fonts as well.

Also included, is test-wrong-size.pdf, which shows how the PDF is rendered before I changed the page units from mm.

So far the only work around I've found is to export the image as PNG from Inkscape, and include that in the document instead. I'd prefer to be able to directly include the SVG though.