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 Rob Sargent <rs...@xmission.com> on 2012/08/27 17:09:39 UTC
using cmyk() in fop-1.1rc1
Does anyone have at hand (a link to) an example of using the cmyk()
function. All I get is "Could not find function: cmyk". Who supplies
this function?
Running from cli ~/tools/fop/fop-1.1rc1/fop -xml doc-1.xml -xsl
/d3/support/config/stylesheet/prose.xsl -foout cmyk.fo
with this (attempted) call in my stylesheet:
<xsl:param name="darkbackgroundcolor">
<xsl:value-of select="cmyk(0.0, 0.564, 0.529, 0.325)"/>
</xsl:param>
with this CLASSPATH
$HOME/tools/fop/fop-1.1rc1/lib/xmlgraphics-commons-1.5rc1.jar:\
$HOME/tools/fop/fop-1.1rc1/lib/xml-apis-ext-1.3.04.jar:\
$HOME/tools/fop/fop-1.1rc1/lib/xml-apis-1.3.04.jar:\
$HOME/tools/fop/fop-1.1rc1/lib/xercesImpl-2.7.1.jar:\
$HOME/tools/fop/fop-1.1rc1/lib/xalan-2.7.0.jar:\
$HOME/tools/fop/fop-1.1rc1/lib/servlet-2.2.jar:\
$HOME/tools/fop/fop-1.1rc1/lib/serializer-2.7.0.jar:\
$HOME/tools/fop/fop-1.1rc1/lib/commons-logging-1.0.4.jar:\
$HOME/tools/fop/fop-1.1rc1/lib/commons-io-1.3.1.jar:\
$HOME/tools/fop/fop-1.1rc1/lib/batik-all-1.7.jar:\
$HOME/tools/fop/fop-1.1rc1/lib/avalon-framework-4.2.0.jar:\
$HOME/tools/fop/fop-1.1rc1/build/fop.jar:\
$HOME/tools/fop/fop-1.1rc1/build/fop-sandbox.jar:\
$HOME/tools/fop/fop-1.1rc1/build/fop-hyph.jar:\
$HOME/.m2/repository/com/amirsys/book-printing/book-printing-core/1.0.45-SNAPSHOT/book-printing-core-1.0.45-SNAPSHOT.jar:\
$APPDIR/plugins/com.amirsys.utilities_4.9.0/lib/jaxen.jar:\
$APPDIR/plugins/com.amirsys.utilities_4.9.0/lib/jdom.jar:\
$APPDIR/plugins/com.amirsys.utilities_4.9.0/lib/log4j.jar:\
$APPDIR/plugins/com.amirsys.utilities_4.9.0/lib/acres-legacy.jar:\
$APPDIR/plugins/com.amirsys.console_4.9.0/fop/fop100/fop/lib/fop-hyph.jar:\
$APPDIR/plugins/com.amirsys.console_4.9.0/console.jar
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: using cmyk() in fop-1.1rc1 SOLVED
Posted by Rob Sargent <rs...@xmission.com>.
I will definitely take this under serious consideration. We use two
different profiles programmatically so this advice may be very timely,
thank you. I need to rework a "pipeline" just to get away from
fake-RGB-later-stringreplaced-in-pdf plan.
Here I go conflating two issues again but...Did fop-1.1rc1 change the
way it writes colours (cmyk) into the pdf?
rjs
On 08/28/2012 09:20 AM, Chris Bowditch wrote:
> On 27/08/2012 17:07, Rob Sargent wrote:
>
> Hi Rob,
>
>> Bingo. I was completely off-base in thinking it was an xslt function.
>> Your suggestion works like a charm. This helps clean up local
>> colour-guessing a lot.
>
> BTW, I strongly recommend using rgb-icc function instead of cmyk. The
> rgb-icc function achieves the same thing as cmyk, but has 2 key
> benefits over cmyk:
>
> 1. It is more flexible as it supports any named ICC Profile, not just
> uncalibrated CMYK
> 2. rgb-icc is part of the XSL-FO recommendation and therefore portable
> to other XSL-FO Formatters. cmyk function is custom to FOP.
>
> Thanks,
>
> Chris
>
>>
>> THANKS,
>>
>> rjs
>>
>>
>> On 08/27/2012 09:39 AM, Sergiu Dumitriu wrote:
>>> On 08/27/2012 11:09 AM, Rob Sargent wrote:
>>>> Does anyone have at hand (a link to) an example of using the cmyk()
>>>> function. All I get is "Could not find function: cmyk". Who supplies
>>>> this function?
>>>>
>>>> Running from cli ~/tools/fop/fop-1.1rc1/fop -xml doc-1.xml -xsl
>>>> /d3/support/config/stylesheet/prose.xsl -foout cmyk.fo
>>>>
>>>> with this (attempted) call in my stylesheet:
>>>> <xsl:param name="darkbackgroundcolor">
>>>> <xsl:value-of select="cmyk(0.0, 0.564, 0.529, 0.325)"/>
>>>> </xsl:param>
>>>
>>> Definitely not XSLT. The way you wrote this, it's not FOP that fails
>>> to find the function, but the XSLT engine that transforms XML into
>>> FO. Try something like:
>>>
>>> <xsl:param name="darkbackgroundcolor">
>>> <xsl:text>cmyk(0.0, 0.564, 0.529, 0.325)</xsl:text>
>>> </xsl:param>
>>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: using cmyk() in fop-1.1rc1 SOLVED
Posted by Chris Bowditch <bo...@hotmail.com>.
On 27/08/2012 17:07, Rob Sargent wrote:
Hi Rob,
> Bingo. I was completely off-base in thinking it was an xslt function.
> Your suggestion works like a charm. This helps clean up local
> colour-guessing a lot.
BTW, I strongly recommend using rgb-icc function instead of cmyk. The
rgb-icc function achieves the same thing as cmyk, but has 2 key benefits
over cmyk:
1. It is more flexible as it supports any named ICC Profile, not just
uncalibrated CMYK
2. rgb-icc is part of the XSL-FO recommendation and therefore portable
to other XSL-FO Formatters. cmyk function is custom to FOP.
Thanks,
Chris
>
> THANKS,
>
> rjs
>
>
> On 08/27/2012 09:39 AM, Sergiu Dumitriu wrote:
>> On 08/27/2012 11:09 AM, Rob Sargent wrote:
>>> Does anyone have at hand (a link to) an example of using the cmyk()
>>> function. All I get is "Could not find function: cmyk". Who supplies
>>> this function?
>>>
>>> Running from cli ~/tools/fop/fop-1.1rc1/fop -xml doc-1.xml -xsl
>>> /d3/support/config/stylesheet/prose.xsl -foout cmyk.fo
>>>
>>> with this (attempted) call in my stylesheet:
>>> <xsl:param name="darkbackgroundcolor">
>>> <xsl:value-of select="cmyk(0.0, 0.564, 0.529, 0.325)"/>
>>> </xsl:param>
>>
>> Definitely not XSLT. The way you wrote this, it's not FOP that fails
>> to find the function, but the XSLT engine that transforms XML into
>> FO. Try something like:
>>
>> <xsl:param name="darkbackgroundcolor">
>> <xsl:text>cmyk(0.0, 0.564, 0.529, 0.325)</xsl:text>
>> </xsl:param>
>>
>
>
>
> ---------------------------------------------------------------------
> 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: using cmyk() in fop-1.1rc1 SOLVED
Posted by Rob Sargent <rs...@xmission.com>.
Bingo. I was completely off-base in thinking it was an xslt function.
Your suggestion works like a charm. This helps clean up local
colour-guessing a lot.
THANKS,
rjs
On 08/27/2012 09:39 AM, Sergiu Dumitriu wrote:
> On 08/27/2012 11:09 AM, Rob Sargent wrote:
>> Does anyone have at hand (a link to) an example of using the cmyk()
>> function. All I get is "Could not find function: cmyk". Who supplies
>> this function?
>>
>> Running from cli ~/tools/fop/fop-1.1rc1/fop -xml doc-1.xml -xsl
>> /d3/support/config/stylesheet/prose.xsl -foout cmyk.fo
>>
>> with this (attempted) call in my stylesheet:
>> <xsl:param name="darkbackgroundcolor">
>> <xsl:value-of select="cmyk(0.0, 0.564, 0.529, 0.325)"/>
>> </xsl:param>
>
> Definitely not XSLT. The way you wrote this, it's not FOP that fails
> to find the function, but the XSLT engine that transforms XML into FO.
> Try something like:
>
> <xsl:param name="darkbackgroundcolor">
> <xsl:text>cmyk(0.0, 0.564, 0.529, 0.325)</xsl:text>
> </xsl:param>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: using cmyk() in fop-1.1rc1
Posted by Sergiu Dumitriu <se...@gmail.com>.
On 08/27/2012 11:09 AM, Rob Sargent wrote:
> Does anyone have at hand (a link to) an example of using the cmyk()
> function. All I get is "Could not find function: cmyk". Who supplies
> this function?
>
> Running from cli ~/tools/fop/fop-1.1rc1/fop -xml doc-1.xml -xsl
> /d3/support/config/stylesheet/prose.xsl -foout cmyk.fo
>
> with this (attempted) call in my stylesheet:
> <xsl:param name="darkbackgroundcolor">
> <xsl:value-of select="cmyk(0.0, 0.564, 0.529, 0.325)"/>
> </xsl:param>
Definitely not XSLT. The way you wrote this, it's not FOP that fails to
find the function, but the XSLT engine that transforms XML into FO. Try
something like:
<xsl:param name="darkbackgroundcolor">
<xsl:text>cmyk(0.0, 0.564, 0.529, 0.325)</xsl:text>
</xsl:param>
--
Sergiu Dumitriu
http://purl.org/net/sergiu/
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: using cmyk() in fop-1.1rc1
Posted by Pascal Sancho <ps...@gmail.com>.
Hi,
cmyk() is not an XSLT function, it is a FOP extension for XSL-FO (see [1]).
In your snippet, you should use it as this:
<xsl:param name="darkbackgroundcolor">cmyk(0.0, 0.564, 0.529, 0.325)</xsl:param>
[1] http://xmlgraphics.apache.org/fop/1.0/extensions.html#color-function-cmyk
2012/8/27 Rob Sargent <rs...@xmission.com>:
> Does anyone have at hand (a link to) an example of using the cmyk()
> function. All I get is "Could not find function: cmyk". Who supplies this
> function?
>
> Running from cli ~/tools/fop/fop-1.1rc1/fop -xml doc-1.xml -xsl
> /d3/support/config/stylesheet/prose.xsl -foout cmyk.fo
>
> with this (attempted) call in my stylesheet:
> <xsl:param name="darkbackgroundcolor">
> <xsl:value-of select="cmyk(0.0, 0.564, 0.529, 0.325)"/>
> </xsl:param>
>
> with this CLASSPATH
> $HOME/tools/fop/fop-1.1rc1/lib/xmlgraphics-commons-1.5rc1.jar:\
> $HOME/tools/fop/fop-1.1rc1/lib/xml-apis-ext-1.3.04.jar:\
> $HOME/tools/fop/fop-1.1rc1/lib/xml-apis-1.3.04.jar:\
> $HOME/tools/fop/fop-1.1rc1/lib/xercesImpl-2.7.1.jar:\
> $HOME/tools/fop/fop-1.1rc1/lib/xalan-2.7.0.jar:\
> $HOME/tools/fop/fop-1.1rc1/lib/servlet-2.2.jar:\
> $HOME/tools/fop/fop-1.1rc1/lib/serializer-2.7.0.jar:\
> $HOME/tools/fop/fop-1.1rc1/lib/commons-logging-1.0.4.jar:\
> $HOME/tools/fop/fop-1.1rc1/lib/commons-io-1.3.1.jar:\
> $HOME/tools/fop/fop-1.1rc1/lib/batik-all-1.7.jar:\
> $HOME/tools/fop/fop-1.1rc1/lib/avalon-framework-4.2.0.jar:\
> $HOME/tools/fop/fop-1.1rc1/build/fop.jar:\
> $HOME/tools/fop/fop-1.1rc1/build/fop-sandbox.jar:\
> $HOME/tools/fop/fop-1.1rc1/build/fop-hyph.jar:\
> $HOME/.m2/repository/com/amirsys/book-printing/book-printing-core/1.0.45-SNAPSHOT/book-printing-core-1.0.45-SNAPSHOT.jar:\
> $APPDIR/plugins/com.amirsys.utilities_4.9.0/lib/jaxen.jar:\
> $APPDIR/plugins/com.amirsys.utilities_4.9.0/lib/jdom.jar:\
> $APPDIR/plugins/com.amirsys.utilities_4.9.0/lib/log4j.jar:\
> $APPDIR/plugins/com.amirsys.utilities_4.9.0/lib/acres-legacy.jar:\
> $APPDIR/plugins/com.amirsys.console_4.9.0/fop/fop100/fop/lib/fop-hyph.jar:\
> $APPDIR/plugins/com.amirsys.console_4.9.0/console.jar
--
pascal
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org