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 Arturo Perez <ap...@hayesinc.com> on 2006/10/17 18:28:59 UTC
Programmatically set hyphenation-base
Hi all,
I've pored over the documentation for 0.92beta but I don't see any API for setting the hyphenation-base user configuration parameter, unlike the situation with font-base.
Is there in fact no way to set it when FOP is embedded in a servlet? If so, any suggestions for what I should set it to?
tia,
arturo
Re: Programmatically set hyphenation-base
Posted by "J.Pietschmann" <j3...@yahoo.de>.
Arturo Perez wrote:
> I've pored over the documentation for 0.92beta but I don't see any
> API for setting the hyphenation-base user configuration parameter,
> unlike the situation with font-base.
>
> Is there in fact no way to set it when FOP is embedded in a servlet?
> If so, any suggestions for what I should set it to?
Indeed there seems to be no convenient way to set the hyphenation base.
The hard way probably goes like this:
import org.apache.avalon.framework.configuration.DefaultConfiguration;
...
DefaultConfiguration cfg = new DefaultConfiguration("")
DefaultConfiguration hyphBase = cfg.getChild("hyphenation-base",true);
hyphBase.setValue("a base url or directory");
FopFactory factory = FopFactory.newInstance();
factory.setUserConfig(cfg);
... create FO processor and so on ...
You can (should) add other configuration options to cfg as well.
Beware: completely untested and based on wild guesses as well as
http://excalibur.apache.org/apidocs/org/apache/avalon/framework/configuration/DefaultConfiguration.html
and other docs.
Have fun!
J.Pietschmann
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org