xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vincent Hennebert <vhenneb...@gmail.com>
Subject Re: How to install hyphenation patterns in FOP?
Date Tue, 10 Nov 2009 10:35:44 GMT
Hi Jerzy,

Jerzy Jalocha N wrote:
> Simon, even if your instructions didn't work, you helped me to get it
> finally working!
> 
> On Mon, Nov 9, 2009 at 6:22 PM, Simon Pepping  wrote:
>> You are right, on Debian (and Ubuntu) systems these instructions do
>> not work.
>>
>> On my debian system the fop script is a little different from yours:
>>
>> diff of /usr/bin/fop with your fop script
>> ==========
>>  find_jars xml-apis-ext
>> +
>> +# We load the hyphenation jar at the request of the user.
>> +if [ "$FOP_HYPHENATION_PATH" ]; then
>> +    find_jars $FOP_HYPHENATION_PATH
>> +fi
>>  find_jars fop
>>
>> 4 lines were added. This addition allows you to put fop-hyph.jar
>> wherever you like, e.g. in /usr/local/lib/java/fop-hyph.jar, or in
>> ~/fop-hyph.jar, and set
>>
>> export FOP_HYPHENATION_PATH=/usr/local/lib/java/fop-hyph.jar
> 
> Strangely, this did not work. I added these lines to my /usr/bin/fop
> script, but even after successfully exporting FOP_HYPHENATION_PATH to
> the correct location, FOP still couldn't find the patterns.
> 
> But your patch led me to inspect the
> /usr/lib/java-wrappers/java-wrappers.sh script, where I discovered
> that I could use JAVA_CLASSPATH instead. Thus, the following lines
> finally DO WORK as expected:
> 
> $ export JAVA_CLASSPATH=$JAVA_CLASSPATH:/home/work/hyphenation/fop-hyph.jar
> $ fop source.fo result.pdf
> 
> I don't know if this is "elegant", safe, or recommended practice. But

Neither of those :-)

The Debian/Ubuntu developers don’t use the shell script provided with
FOP. They wrote their own script (which, BTW, is quite neat) that is
adapted to the way Java is handled on those platforms. For example,
instead of shipping the dependencies with the FOP package, they made
separate packages for each of them (Apache Commons IO, Batik, XML
Graphics Commons, etc.). That way, if other packages share common
dependencies, those will be installed only once and not duplicated all
over the system.

Now, there appears to be a missing package relating to the hyphenation
patterns. What you should ask the Debian/Ubuntu developers is to create
one and make the FOP package depend on it (more precisely, ‘recommend’
it).

As a user you shouldn’t have to modify any file installed by the package
system (other than configuration files).

> it does the job perfectly for me, as I use FOP exclusively from
> command-line and bash scripts, and don't need to launch from any
> menus.
> 
> Since I am currently in contact with the Ubuntu packager, I will tell
> him the results.
> 
> Thank you very much, Simon!
> 
> Regards, Jerzy

HTH,
Vincent

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Mime
View raw message