Re: Programmatically set hyphenation-base

2006-10-18 Thread J.Pietschmann

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Programmatically set hyphenation-base

2006-10-18 Thread Arturo Perez
Title: 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