On Tue, May 8, 2012 at 9:51 AM, Francesco
Chicchiriccò
<ilgrosso@apache.org>
wrote:
On 08/05/2012 09:48, Jos Snellings wrote:
Dear cocooners,
We use FOP to generate a PDF publication of a thesaurus.
Needing cyrillic & greek we have to setup
a user configuration. This is not yet foreseen in the
current FOPSerializer.
Yesterday Robby and Ivan were so kind to send me a working
Cocoon 2.2 configuration.
This morning, there was room to adapt it to C3.
I suggest that we extend FOPSerializer.java a bit, to
include an internal configuration file & resources.:
public FlopSerializer(String outputFormat, String
userConfigurationPath) {
if (outputFormat == null) {
throw new IllegalArgumentException("The
parameter 'outputFormat' mustn't be null.");
}
URL configurationURL =
this.getClass().getResource("/COB-INF/" +
userConfigurationPath);
try {
DefaultConfigurationBuilder cfgBuilder = new
DefaultConfigurationBuilder();
Configuration cfg = cfgBuilder.build(configurationURL.openStream());
FOP_FACTORY.setUserConfig(cfg);
this.outputFormat = outputFormat;
}
This way, we can package our custom configuration and the
font in the block jar.
Hi Jos,
this looks very nice: could you open an issue on JIRA and
provide a proper patch for this? I would be glad to take it,
then. Thanks!
Regards.