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 Régis Fénéon <re...@free.fr> on 2011/02/26 11:51:09 UTC

PDF output: svg images with transparent color gradient

Hello,

I use fop to convert docbook documents to pdf. I have some issues when a
document includes a svg image that contains a transparent color gradient:
- the colors of the image and the other parts of the page are wrong, it
looks like a different color space is used,
- this problem occurs not only on the page that contains the image, but
several pages before and after the image,
- the rest of the document has the correct colors.
The problem disappears if I modify the svg image to use an fully opaque
gradient.

Versions: FOP 1.0, JRE 1.6.0_20, Windows 7 64-bit

Thanks in advance,
regis

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: PDF output: svg images with transparent color gradient

Posted by Régis Fénéon <re...@free.fr>.
Hi,

I have made a quick'n dirty patch to fop to add the following command to
each page section:

/Group << /S /Transparency /I true /CS /DeviceRGB>>

This solves the problem I had with transparent svg images, and I think
this is the same problem as the bug #45809. It would be nice if a fop
developper could take a look at this. It's an old bug that makes the pdf
documents look wrong, definitely not a minor bug for me.

Thanks,
regis


Le 26/02/2011 14:35, Tavmjong Bah a écrit :
> On Sat, 2011-02-26 at 11:51 +0100, Régis Fénéon wrote:
>> Hello,
>>
>> I use fop to convert docbook documents to pdf. I have some issues when a
>> document includes a svg image that contains a transparent color gradient:
>> - the colors of the image and the other parts of the page are wrong, it
>> looks like a different color space is used,
>> - this problem occurs not only on the page that contains the image, but
>> several pages before and after the image,
>> - the rest of the document has the correct colors.
>> The problem disappears if I modify the svg image to use an fully opaque
>> gradient.
>>
>> Versions: FOP 1.0, JRE 1.6.0_20, Windows 7 64-bit
> I had a similar problem with PNGs, JPGs, and some SVGs when viewing
> files using Acroread on Linux and to a lesser extent with Acroread on
> Windows XP (Evince got the colors correct). By default, PDF uses
> DeviceCMYK when you probably want DeviceRGB for compositing a page with
> an SVG. I wrote a little script that goes through the PDF file and adds:
>
> 	/Group << /S /Transparency /I true /CS /DeviceRGB>>
>
> after each /Page (I found this workaround on the bmeps web site). I then
> ran the PDF file through pdftk to fix the references. This fixed the
> problem for me. Check the fop-users archives for September 2009 for more
> details.
>
> 					Tav
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: PDF output: svg images with transparent color gradient

Posted by Régis Fénéon <re...@free.fr>.
Tav, thanks for the workaround, this solved the problem.

Are there some plans to include this correction into a future release?

regis

Le 26/02/2011 14:35, Tavmjong Bah a écrit :
> On Sat, 2011-02-26 at 11:51 +0100, Régis Fénéon wrote:
>> Hello,
>>
>> I use fop to convert docbook documents to pdf. I have some issues when a
>> document includes a svg image that contains a transparent color gradient:
>> - the colors of the image and the other parts of the page are wrong, it
>> looks like a different color space is used,
>> - this problem occurs not only on the page that contains the image, but
>> several pages before and after the image,
>> - the rest of the document has the correct colors.
>> The problem disappears if I modify the svg image to use an fully opaque
>> gradient.
>>
>> Versions: FOP 1.0, JRE 1.6.0_20, Windows 7 64-bit
> I had a similar problem with PNGs, JPGs, and some SVGs when viewing
> files using Acroread on Linux and to a lesser extent with Acroread on
> Windows XP (Evince got the colors correct). By default, PDF uses
> DeviceCMYK when you probably want DeviceRGB for compositing a page with
> an SVG. I wrote a little script that goes through the PDF file and adds:
>
> 	/Group << /S /Transparency /I true /CS /DeviceRGB>>
>
> after each /Page (I found this workaround on the bmeps web site). I then
> ran the PDF file through pdftk to fix the references. This fixed the
> problem for me. Check the fop-users archives for September 2009 for more
> details.



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: PDF output: svg images with transparent color gradient

Posted by Tavmjong Bah <ta...@free.fr>.
On Sat, 2011-02-26 at 11:51 +0100, Régis Fénéon wrote:
> Hello,
> 
> I use fop to convert docbook documents to pdf. I have some issues when a
> document includes a svg image that contains a transparent color gradient:
> - the colors of the image and the other parts of the page are wrong, it
> looks like a different color space is used,
> - this problem occurs not only on the page that contains the image, but
> several pages before and after the image,
> - the rest of the document has the correct colors.
> The problem disappears if I modify the svg image to use an fully opaque
> gradient.
> 
> Versions: FOP 1.0, JRE 1.6.0_20, Windows 7 64-bit

I had a similar problem with PNGs, JPGs, and some SVGs when viewing
files using Acroread on Linux and to a lesser extent with Acroread on
Windows XP (Evince got the colors correct). By default, PDF uses
DeviceCMYK when you probably want DeviceRGB for compositing a page with
an SVG. I wrote a little script that goes through the PDF file and adds:

	/Group << /S /Transparency /I true /CS /DeviceRGB>>

after each /Page (I found this workaround on the bmeps web site). I then
ran the PDF file through pdftk to fix the references. This fixed the
problem for me. Check the fop-users archives for September 2009 for more
details.

					Tav




---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org