#14109 closed defect (invalid)
FOP: two possible issues: (1) SEVERE: Couldn't find hyphenation pattern en_en (2) -q option not quiet?
Reported by: | grahamperrin@… | Owned by: | boeyms@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.6.0 |
Keywords: | Cc: | grahamperrin@… | |
Port: |
Description
Re: SmartPrintNG with FOP: RuntimeError: Error executing: "/opt/local/bin/fop" -fo "/tmp/tmph_UkKm.fo" -pdf "/tmp/tmpIEwQCN.pdf" and its originating thread SmartPrintNG … Conversion failed (Error code: 500)
Please: is what's there symptomatic of a FOP installation error?
If I
- ignore the browser's presentation
Conversion failed (Error code: 500)
and instead
- run the command alone, for example
"/opt/local/bin/fop" -fo "/tmp/tmph_UkKm.fo" -pdf "/tmp/tmpIEwQCN.pdf"
then
- despite the output
29-Jan-2008 20:06:15 org.apache.fop.hyphenation.Hyphenator getHyphenationTree SEVERE: Couldn't find hyphenation pattern en_en
- the PDF is produced and at a glance, the PDF is integral.
Another highlight from that thread,
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.
(I shouldn't normally mix two possible issues in one ticket but it helps to have both in context. We can spin off another ticket if necessary.)
Thanks for any advice.
Graham
Attachments (5)
Change History (10)
comment:1 Changed 17 years ago by jmpalacios (Juan Manuel Palacios)
Milestone: | → Port Bugs |
---|
Changed 17 years ago by grahamperrin@…
Attachment: | FOP-install.log.txt.zip added |
---|
Changed 17 years ago by grahamperrin@…
Attachment: | tmpW46o3U.fo added |
---|
fop -fo "/tmp/tmpW46o3U.fo" -pdf "/tmp/tmpvCKhH-.pdf2"
Changed 17 years ago by grahamperrin@…
Attachment: | tmpvCKhH-.html added |
---|
fop -fo "/tmp/tmpW46o3U.fo" -pdf "/tmp/tmpvCKhH-.pdf2"
Changed 17 years ago by grahamperrin@…
Attachment: | tmpvCKhH-.pdf2 added |
---|
fop -fo "/tmp/tmpW46o3U.fo" -pdf "/tmp/tmpvCKhH-.pdf2"
Changed 17 years ago by grahamperrin@…
Attachment: | screen shot from tmpvCKhH-.pdf2.png added |
---|
screen shot from the preceding .pdf2 file
comment:2 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)
Owner: | changed from macports-tickets@… to boeyms@… |
---|
Assigning to maintainer of fop.
comment:3 Changed 17 years ago by boeyms@…
Resolution: | → invalid |
---|---|
Status: | new → closed |
Replying to grahamperrin@gmail.com:
Re: SmartPrintNG with FOP: RuntimeError: Error executing: "/opt/local/bin/fop" -fo "/tmp/tmph_UkKm.fo" -pdf "/tmp/tmpIEwQCN.pdf" and its originating thread SmartPrintNG … Conversion failed (Error code: 500)
Please: is what's there symptomatic of a FOP installation error?
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:
- See if you can change your FO files either to have a valid value for
country
(e.g.EN
,AU
,UK
) that works withlanguage="en"
(note that FOP might be case-sensitive about this -- 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). - 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.
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.
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.
comment:4 Changed 17 years ago by grahamperrin@…
Solved! A careless mistake, see http://thread.gmane.org/gmane.comp.web.zope.plone.user/81544/focus=82108
http://paste.lisp.org/display/55296#4 reminds me that credit is due to [pwgr] in irc://irc.freenode.net/##java
(I also spent some time in irc://irc.freenode.net/#apache but gained no answers to FOP-related questions.)
Regards
Graham
I uninstalled fop, then installed again with -d for debug output