xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oskar Berggren <oskar.bergg...@gmail.com>
Subject Re: SVG styles being ignored
Date Wed, 11 Sep 2019 21:41:43 GMT
Batik bug since 2015:
https://issues.apache.org/jira/browse/BATIK-1112

Sometimes coincidences are ridiculous... I discovered the existence of this
problem only yesterday and tried to bring some attention to it:
http://mail-archives.apache.org/mod_mbox/xmlgraphics-batik-dev/201909.mbox/%3CCAHOuc7PL0%2Be-8H5Ahagm5q7ChSk%3DX6zsFMgs8gwot5-gHONKJQ%40mail.gmail.com%3E


Den ons 11 sep. 2019 kl 21:09 skrev Samuel Penn <sam@notasnark.net>:

> 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):
>     width="744.09448819"
>     height="1052.3622047"
> Inkscape recently changed things to:
>     width="210mm"
>     height="297mm"
>
> 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:
>
> https://drive.google.com/open?id=1gFt4qC-30GA1VapKicCvTDjrbbiE093e
>
> 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.
>
> Thanks.
>
> --
> Sam.
> https://www.notasnark.net/
>
>
>
>

Mime
View raw message