You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by cedric bompart <ce...@gmail.com> on 2014/12/01 12:02:26 UTC

SVG to PDF: rasterized image on filter effect/mask/clipping path ?

Hi,

I'm currently converting a JavaFX node graph to PDF (via a SVG document).
I'm using FOP 1.1 and Batik 1.7 on Java 7.

I'm trying to apply filter effects to a SVG node and the result on the PDF
output produces an "ugly" rasterized image on top of the affected area. I'm
getting a similar result if I'm using a clipping path or a mask.

Is that the intended behaviour?  The intermediate SVG document is nicely
rendered in Inkscape, the effect/mask affects only the colour matrix.
I'm only dealing with effects which alter the colour matrix (saturation,
hue, brightness, etc). I'm not doing any kind of Gaussian blur which an
image mask could be appropriate as an implementation of this effect.

Due to this weird behaviour, for clipping a shape; I've implemented
directly the clipping on the shape path instead of using an independent
clipping path.

Do I need to do the same thing for altering the colours on a shape; by
manually doing the effect on the colour fill/stroke of a shape instead of
using a filter effect?

Can somebody shed some light please? :-)


Regards,
Ced.

PS: I'm not sure if this is intended for FOP or Batik project but the PDF
transcoder is in FOP...

Re: SVG to PDF: rasterized image on filter effect/mask/clipping path ?

Posted by Luis Bernardo <lm...@gmail.com>.
Can you provide your SVG? What is the FOP transcoder version (too see that
check the Producer entry in the Properties of the generated PDF)?


On Mon, Dec 1, 2014 at 11:02 AM, cedric bompart <ce...@gmail.com>
wrote:

> Hi,
>
> I'm currently converting a JavaFX node graph to PDF (via a SVG document).
> I'm using FOP 1.1 and Batik 1.7 on Java 7.
>
> I'm trying to apply filter effects to a SVG node and the result on the PDF
> output produces an "ugly" rasterized image on top of the affected area. I'm
> getting a similar result if I'm using a clipping path or a mask.
>
> Is that the intended behaviour?  The intermediate SVG document is nicely
> rendered in Inkscape, the effect/mask affects only the colour matrix.
> I'm only dealing with effects which alter the colour matrix (saturation,
> hue, brightness, etc). I'm not doing any kind of Gaussian blur which an
> image mask could be appropriate as an implementation of this effect.
>
> Due to this weird behaviour, for clipping a shape; I've implemented
> directly the clipping on the shape path instead of using an independent
> clipping path.
>
> Do I need to do the same thing for altering the colours on a shape; by
> manually doing the effect on the colour fill/stroke of a shape instead of
> using a filter effect?
>
> Can somebody shed some light please? :-)
>
>
> Regards,
> Ced.
>
> PS: I'm not sure if this is intended for FOP or Batik project but the PDF
> transcoder is in FOP...
>
>
>

Re: SVG to PDF: rasterized image on filter effect/mask/clipping path ?

Posted by Maruan Sahyoun <sa...@fileaffairs.de>.
Hi,

SVG handling is using Batik so in order to isolate the issue test SVG rasterizing using Batik first. 

BR

Maruan

Am 01.12.2014 um 12:02 schrieb cedric bompart <ce...@gmail.com>:

> Hi,
> 
> I'm currently converting a JavaFX node graph to PDF (via a SVG document). I'm using FOP 1.1 and Batik 1.7 on Java 7.
> 
> I'm trying to apply filter effects to a SVG node and the result on the PDF output produces an "ugly" rasterized image on top of the affected area. I'm getting a similar result if I'm using a clipping path or a mask.
> 
> Is that the intended behaviour?  The intermediate SVG document is nicely rendered in Inkscape, the effect/mask affects only the colour matrix.
> I'm only dealing with effects which alter the colour matrix (saturation, hue, brightness, etc). I'm not doing any kind of Gaussian blur which an image mask could be appropriate as an implementation of this effect.
> 
> Due to this weird behaviour, for clipping a shape; I've implemented directly the clipping on the shape path instead of using an independent clipping path.
> 
> Do I need to do the same thing for altering the colours on a shape; by manually doing the effect on the colour fill/stroke of a shape instead of using a filter effect?
> 
> Can somebody shed some light please? :-)
> 
> 
> Regards,
> Ced.
> 
> PS: I'm not sure if this is intended for FOP or Batik project but the PDF transcoder is in FOP...
> 
>