fop warning: "SEVERE: Couldn't find hyphenation pattern en" (missing fop-hyph package)

Bug #310882 reported by Murray Cumming
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
fop (Fedora)
Invalid
Medium
fop (Ubuntu)
New
Wishlist
Onkar Shinde

Bug Description

On Ubuntu Intrepid, when trying to generate a PDF with fop, I see this SEVERE warning. I assume that it is significant.

Making portrait pages on A4 paper (210mmx297mm)
Read /usr/share/doc/docbook-xsl/README.Debian section 5(a).
fop pdf/flumotion.fo pdf/flumotion.pdf
Dec 23, 2008 12:33:08 PM org.apache.fop.hyphenation.Hyphenator getHyphenationTree
SEVERE: Couldn't find hyphenation pattern en

Revision history for this message
Murray Cumming (murrayc) wrote :
Revision history for this message
Murray Cumming (murrayc) wrote :
Revision history for this message
EmmaJane (emmajane) wrote :

The hyphenation patterns are no longer included in the FOP package (as of 0.92, IIRC). You must install them separately.

Instructions at:
http://offo.sourceforge.net/hyphenation/fop-stable/installation.html

Download the "stable" package from:
http://sourceforge.net/project/showfiles.php?group_id=116740&package_id=129569&release_id=641581

Revision history for this message
Murray Cumming (murrayc) wrote :

I assume that's a hint to the packagers, not to the user, right? I see no way for an Ubuntu user to easily install this - there's no fop-hyph Ubuntu package.

Revision history for this message
In , Murray (murray-redhat-bugs) wrote :

On Fedora 10, when trying to generate a PDF with fop, it fails like so, presumably because fop-hyph is not packaged. It was previously part of fop itself, as pointed out in this similar Ubuntu bug:
https://bugs.launchpad.net/ubuntu/+source/fop/+bug/310882

This is the full error:
Jan 6, 2009 4:26:56 PM org.apache.fop.hyphenation.Hyphenator getHyphenationTree
SEVERE: Couldn't find hyphenation pattern en

Changed in fop:
status: Unknown → Confirmed
Changed in fop:
assignee: nobody → onkarshinde
importance: Undecided → Wishlist
Revision history for this message
Onkar Shinde (onkarshinde) wrote :

A small update on this issue.
I also see the error about missing hyphenation pattern but fop doesn't crash in my case. And there is a PDF generated.

I am using following command:
$ fop -xml flumotion.xml -xsl /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl -pdf flumotion.pdf

Output:
1 Feb, 2009 3:38:07 PM org.apache.fop.cli.InputHandler warning
WARNING: javax.xml.transform.TransformerException: Making portrait pages on A4 paper (210mmx297mm)
1 Feb, 2009 3:38:07 PM org.apache.fop.cli.InputHandler warning
WARNING: javax.xml.transform.TransformerException: Read /usr/share/doc/docbook-xsl/README.Debian section 5(a).
1 Feb, 2009 3:38:11 PM org.apache.fop.fo.flow.ExternalGraphic bind
SEVERE: Image not available: url(figures/fluendo.png)
1 Feb, 2009 3:38:12 PM org.apache.fop.hyphenation.Hyphenator getHyphenationTree
SEVERE: Couldn't find hyphenation pattern en

Can you please confirm if this is the case on your side as well? If it is then your error is something else. May be the error is related to the PNG image you are using since I don't have the png image on my machine.

Revision history for this message
Murray Cumming (murrayc) wrote :

Yes, sorry. The crash was due to a separate bug - the inability of fop to read .png files, already fixed upstream (I hope that can be packaged for Ubuntu soon too).
https://issues.apache.org/bugzilla/show_bug.cgi?id=45795

When I remove the mention of the .png from the test file then I just get the SEVERE warning about the lack of fop-hyph, so I retitled this bug report. Thanks.

description: updated
Revision history for this message
In , Ioana (ioana-redhat-bugs) wrote :

The hyphenation patterns can't be included in the fop package due to licensing issues (http://xmlgraphics.apache.org/fop/0.95/hyphenation.html#license-issues). They need to be installed separately (see instructions at http://offo.sourceforge.net/hyphenation/fop-stable/installation.html)

Changed in fop:
status: Confirmed → Invalid
Revision history for this message
Onkar Shinde (onkarshinde) wrote :

@Murray,

Can you please file separate bug for the png problem (if not done already) and attach your test case along with the png file? I will try to backport the fix from upstream svn as the fix is not available in any release yet.

Revision history for this message
Murray Cumming (murrayc) wrote :

The fop png bug was fixed upstream, via a Fedora bug report. It would be great if the fix could be brought into Ubuntu.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45795

Revision history for this message
Onkar Shinde (onkarshinde) wrote :

@Murray,

As I said the upstream fix is not available in a release. So I will have to patch the current Ubuntu source with the fix. And hence I will need a test case to verify the patched source.

Revision history for this message
Murray Cumming (murrayc) wrote :

There's a test case linked from the upstream bug:
https://issues.apache.org/bugzilla/show_bug.cgi?id=45795#c0

Do you need something extra?

Revision history for this message
Murray Cumming (murrayc) wrote :

Onkar, do you have what you need. I notice that this is still a problem in Ubuntu Jaunty.

Revision history for this message
Onkar Shinde (onkarshinde) wrote :

The fix for png problem has been backported from upstream to the version in jaunty.

Regarding hyphenation patterns. AFAIK, they contain lot of non-Free or non-distributable patterns. So I haven't yet got around packaging them so that it would satisfy archive admins. But the fop launcher script now reads some configuration from home directory (or environment variable) where you can specify the path of fop-hyph.jar. This change was implemented by Vincent Fourmond in Debian unstable [1]. This particular fix is not available in Ubuntu jaunty. It is available in Ubuntu karmic though.

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=526092

Revision history for this message
Jerzy Jalocha N (jjalocha) wrote :

Onkar, according to the documentation: "All files hosted by the OFFO project come with an OSI-approved Open Source license, or were placed in the Public Domain by their authors." [1]

Thus, I guess, it should be OK to package them for Debian/Ubuntu. This would be of great help to us end-users, as I have been struggling for hours trying to get FOP to read the OFFO patterns, without success.

[1] http://offo.sourceforge.net/hyphenation/licenses.html

Revision history for this message
Onkar Shinde (onkarshinde) wrote :

That note misrepresents the reality. If you check individual licenses then you will realize that some of them are not distributable at all while some will end up in multiverse (non-free in Debian).

Some examples:
1. en_US.xml - D.E. Knuth's TeX license, and the additional condition: ‘Can be used freely for non-commercial purposes’
Can not be invluded in Debian/Ubuntu because of non-commercial clause.
2. fi.xml - ‘Patterns may be freely distributed’
Does not talk about permission to modify.
3. hu.xml - The file contains no license information

To use hyphenation patterns user can follow following steps.
1. Download the jar file from the website.
2. Set environment variable FOP_HYPHENATION_PATH pointing to the jar file (absolute path).
3. Launch fop as usual.
It is easier than before and currently the optimal solution.

Revision history for this message
Jerzy Jalocha N (jjalocha) wrote :

Onkar, I didn't realize that the licensing information wasn't accurate. I am glad you checked that out carefully!

As for the location of the pattern file, I have tried countless combinations, including FOP_HYPHENATION_PATH, without success. Since I don't want to clutter this post, I opened a separate Question about the installation of hyphenation patterns in FOP: https://answers.launchpad.net/openoffice/+question/88559

Maybe you can help me there.
-Thanks!

Revision history for this message
Jerzy Jalocha N (jjalocha) wrote :

Onkar, on the FOP mailing list it was explained [1] that there is an issue with the custom Debian/Ubuntu /usr/bin/fop script, which prevents FOP_HYPHENATION_PATH from working properly.

Since there are licensing problems that prevent shipping the hyphenation patterns in Debian/Ubuntu, we end-users would be helped if the script could be fixed so that we could install fop-hyph.jar and set FOP_HYPHENATION_PATH manually, as described in the documentation [2].

Thanks!

[1] http://www.mail-archive.com/fop-users%40xmlgraphics.apache.org/msg14027.html
[2] Item 3 in http://offo.sourceforge.net/hyphenation/fop-stable/installation.html

Changed in fop (Fedora):
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.