[MacPorts] #14109: FOP: two possible issues: (1) SEVERE:
Couldn't find hyphenation pattern en_en (2) -q option not quiet?
MacPorts
trac at macosforge.org
Thu Jan 31 19:39:23 PST 2008
#14109: FOP: two possible issues: (1) SEVERE: Couldn't find hyphenation pattern
en_en (2) -q option not quiet?
-------------------------------------+--------------------------------------
Reporter: grahamperrin at gmail.com | Owner: boeyms at macports.org
Type: defect | Status: closed
Priority: Normal | Milestone: Port Bugs
Component: ports | Version: 1.6.0
Resolution: invalid | Keywords:
-------------------------------------+--------------------------------------
Changes (by boeyms at macports.org):
* status: new => closed
* resolution: => invalid
Comment:
Replying to [ticket:14109 grahamperrin at gmail.com]:
> [http://www.nabble.com/Re%3A-SmartPrintNG-with-FOP%3A-RuntimeError%3A-
Error-executing%3A-%22-opt-local-bin-fop%22--fo-%22-tmp-tmph_UkKm.fo%22--
pdf-%22-tmp-tmpIEwQCN.pdf%22-p15175877s6742.html Re: SmartPrintNG with
FOP: RuntimeError: Error executing: "/opt/local/bin/fop" -fo
"/tmp/tmph_UkKm.fo" -pdf "/tmp/tmpIEwQCN.pdf"] and its originating thread
[http://www.nabble.com/SmartPrintNG%3A-template-and-stylesheet
-%28Conversion-failed-%28Error-code%3A-500%29%29-td15161511s6742.html
SmartPrintNG … Conversion failed (Error code: 500)]
>
> Please: is what's there symptomatic of a FOP installation error?
[[BR]]
I'm no FOP expert, but I'm pretty sure that it's not an installation
error. Instead, FOP is behaving as intended (though whether or not that's
good is another question).
The root element of your FO file specifies both `language`(=`"en"`) and
`country`(=`"en"`) attributes, for which FOP then tries to find a
hyphenation pattern file. Unfortunately, there's no ISO country code
`"en"`, much less a country `"en"` that speaks language `"en"` (i.e.
English), so it can't find such a file.
When this happens, it appears that the FOP code typesets without
hyphenations (which is why FOP at the command-line produces a PDF that
looks passable), but exits with a non-zero exit code. I assume that
SmartPrintNG then detects the non-zero exit code and dutifully reports
that there was an error (which is interpreted somewhere along the way as
equivalent to the HTTP 500 error code), but either ignores or throws away
the PDF that FOP actually produced. (If it just ignores it, the PDF in
`/tmp` should remain after SmartPrintNG reports its error.)
So, there are a couple of things to do:
1. See if you can change your FO files either to have a valid value for
`country` (e.g. `EN`, `AU`, `UK`) that works with `language="en"` (note
that FOP might be case-sensitive about this --
[http://xmlgraphics.apache.org/fop/0.94/hyphenation.html their page on
hyphenation] suggests it might be), or have no country attribute at all
(the FOP hyphenation page says that it'll work without one).
2. If that fails, you'll need to install a hyphenation pattern file for
FOP. The above link describes how to do so, but I'll also look into
adding such files into MacPorts to save manual installation.
[[BR]]
----
As for your second question:
> > I tried the -q quiet option for fop,
>
> > "/opt/local/bin/fop" -q -fo "/tmp/tmpDH442r.fo" -pdf
"/tmp/tmplF9uZr.pdf"
>
> > but the output seems no more quiet than without the -q option.
Curious.
[[BR]]
Don't know about this one; `/opt/local/bin/fop` is a shell script wrapper
around the Java FOP executable, but the former does appear to pass on the
`-q` option to the latter. Perhaps FOP is coded such that `-q` doesn't
actually suppress errors classed as `SEVERE`. It'd probably best to ask
on the FOP mailing lists.
I hope that this helps.
--
Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/14109#comment:3>
MacPorts </projects/macports>
Ports system for Mac OS
More information about the macports-tickets
mailing list