color problem with afp

Here should go questions about transforming XML with XSLT and FOP.
Posts: 3
Joined: Mon Jul 09, 2018 12:08 pm

color problem with afp

Post by zouarino » Fri Sep 21, 2018 6:23 pm

I have a color display problem in the afp format.
instead of red, the svg image is in black.

Code: Select all

<fo:table-column column-width="400pt" border="0.5pt solid black" />
<fo:table-cell border="0.5pt solid black">
<fo:block font-weight="bold">Price</fo:block>
<fo:table-cell border="0.5pt solid black" width="200" height="150">
<fo:block color="oca(red)">Red</fo:block>
<fo:block-container position="absolute" >
<svg:svg xmlns: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)" />

Posts: 7273
Joined: Fri Jul 09, 2004 5:18 pm

Re: color problem with afp

Post by Radu » Mon Sep 24, 2018 7:25 am


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:

Radu Coravu
<oXygen/> XML Editor

Post Reply