Page 1 of 1

color problem with afp

Posted: Fri Sep 21, 2018 6:23 pm
by zouarino
Hello,
I have a color display problem in the afp format.
instead of red, the svg image is in black.

Code: Select all



<fo:table>
<fo:table-column column-width="400pt" border="0.5pt solid black" />
<fo:table-header>
<fo:table-row>
<fo:table-cell border="0.5pt solid black">
<fo:block font-weight="bold">Price</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-header>
<fo:table-body>
<fo:table-row>
<fo:table-cell border="0.5pt solid black" width="200" height="150">
<fo:block color="oca(red)">Red</fo:block>
<fo:block></fo:block>
<fo:block-container position="absolute" >
<fo:block>
<fo:instream-foreign-object>
<svg:svg xmlns:svg="http://www.w3.org/2000/svg" width="200" height="150" viewBox="0 0 200 150">
<svg:path stroke-width="0.5" stroke="none" d="M0 0 L200 150" fill="rgb(0,255,0)" />
<svg:path stroke-width="0.5" stroke="none" d="M0 150 L200 0" fill="rgb(0,255,0)" />
</svg:svg>
</fo:instream-foreign-object>
</fo:block>
</fo:block-container>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>



Re: color problem with afp

Posted: Mon Sep 24, 2018 7:25 am
by Radu
Hi,

In your XSL-FO file you specify the foreground color as oca(red). The XSL-FO specification states what functions can be used to specify colors and "oca" is not one of them:

https://www.w3.org/TR/xsl11/#expr-color-functions

Regards,
Radu