You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by "Robert P. J. Day" <rp...@mindspring.com> on 2003/04/13 00:15:19 UTC
looking for a couple tweaks for docbook -> FOP
starting with red hat's "xmlto" utility and the most recent
docbook stylesheets, i hacked the "xmlto" utility to accept a
request to use FOP (rather than passivetex) to do the FO -> PDF
step, and it's not only *way* faster than passivetex, the output
is actually more correct.
however, even though i get output, i still get the following
warnings/errors, so can anyone tell me what params (if any) i
can use to make them go away?
i remember a discussion about language choice for hyphenation,
but i checked the entire FO parameter list, and all i see is
a parameter as to whether i want hyphenation or not, nothing
about a language choice.
anyway, suggestions on how to minimize the following??
Post-process XSL-FO to PDF
[INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[INFO] FOP 0.20.5rc2
[INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[INFO] building formatting object tree
[INFO] setting up fonts
[ERROR] Unknown formatting object http://www.tug.org/fotex^bookmark
[INFO] [1]
[ERROR] no handler defined for http://www.tug.org/fotex:bookmark foreign xml
[INFO] [2]
[ERROR] Couldn't find hyphenation pattern en
[ERROR] Error building hyphenation tree for language en
[ERROR] Couldn't find hyphenation pattern en
[ERROR] Error building hyphenation tree for language en
[INFO] [3]
[INFO] [4]
[INFO] [1]
[ERROR] no handler defined for http://www.tug.org/fotex:bookmark foreign xml
[ERROR] Couldn't find hyphenation pattern en
[ERROR] Error building hyphenation tree for language en
[ERROR] Couldn't find hyphenation pattern en
[ERROR] Error building hyphenation tree for language en
[ERROR] Couldn't find hyphenation pattern en
[ERROR] Error building hyphenation tree for language en
[ERROR] Couldn't find hyphenation pattern en
[ERROR] Error building hyphenation tree for language en
[ERROR] Couldn't find hyphenation pattern en
[ERROR] Error building hyphenation tree for language en
[ERROR] Couldn't find hyphenation pattern en
[ERROR] Error building hyphenation tree for language en
[INFO] [2]
[ERROR] no handler defined for http://www.tug.org/fotex:bookmark foreign xml
[ERROR] Couldn't find hyphenation pattern en
[ERROR] Error building hyphenation tree for language en
[ERROR] Couldn't find hyphenation pattern en
[ERROR] Error building hyphenation tree for language en
[INFO] [3]
[ERROR] no handler defined for http://www.tug.org/fotex:bookmark foreign xml
[ERROR] Couldn't find hyphenation pattern en
[ERROR] Error building hyphenation tree for language en
[ERROR] Couldn't find hyphenation pattern en
[ERROR] Error building hyphenation tree for language en
[ERROR] Couldn't find hyphenation pattern en
[ERROR] Error building hyphenation tree for language en
[ERROR] Couldn't find hyphenation pattern en
[ERROR] Error building hyphenation tree for language en
[ERROR] Couldn't find hyphenation pattern en
[ERROR] Error building hyphenation tree for language en
[ERROR] Couldn't find hyphenation pattern en
[ERROR] Error building hyphenation tree for language en
[INFO] [4]
[ERROR] no handler defined for http://www.tug.org/fotex:bookmark foreign xml
[ERROR] Couldn't find hyphenation pattern en
[ERROR] Error building hyphenation tree for language en
[ERROR] Couldn't find hyphenation pattern en
[ERROR] Error building hyphenation tree for language en
[ERROR] Couldn't find hyphenation pattern en
[ERROR] Error building hyphenation tree for language en
[ERROR] Couldn't find hyphenation pattern en
[ERROR] Error building hyphenation tree for language en
[INFO] [5]
[ERROR] no handler defined for http://www.tug.org/fotex:bookmark foreign xml
[ERROR] Couldn't find hyphenation pattern en
[ERROR] Error building hyphenation tree for language en
[ERROR] Couldn't find hyphenation pattern en
[ERROR] Error building hyphenation tree for language en
[ERROR] no handler defined for http://www.tug.org/fotex:bookmark foreign xml
[ERROR] Error while creating area : Error while recovering Image Informations (file:/tmp/xmlto.3iHa5k/simple.pdf) : /tmp/xmlto.3iHa5k/simple.pdf (No such file or directory)
[ERROR] Couldn't find hyphenation pattern en
[ERROR] Error building hyphenation tree for language en
[ERROR] Couldn't find hyphenation pattern en
[ERROR] Error building hyphenation tree for language en
[ERROR] Couldn't find hyphenation pattern en
[ERROR] Error building hyphenation tree for language en
[ERROR] no handler defined for http://www.tug.org/fotex:bookmark foreign xml
[ERROR] Couldn't find hyphenation pattern en
[ERROR] Error building hyphenation tree for language en
[ERROR] Couldn't find hyphenation pattern en
[ERROR] Error building hyphenation tree for language en
[ERROR] Couldn't find hyphenation pattern en
[ERROR] Error building hyphenation tree for language en
[ERROR] Couldn't find hyphenation pattern en
[ERROR] Error building hyphenation tree for language en
[ERROR] Couldn't find hyphenation pattern en
[ERROR] Error building hyphenation tree for language en
[INFO] [6]
[ERROR] Couldn't find hyphenation pattern en
[ERROR] Error building hyphenation tree for language en
[ERROR] no handler defined for http://www.tug.org/fotex:bookmark foreign xml
[ERROR] Couldn't find hyphenation pattern en
[ERROR] Error building hyphenation tree for language en
[ERROR] Couldn't find hyphenation pattern en
[ERROR] Error building hyphenation tree for language en
[ERROR] Couldn't find hyphenation pattern en
[ERROR] Error building hyphenation tree for language en
[ERROR] Couldn't find hyphenation pattern en
[ERROR] Error building hyphenation tree for language en
[ERROR] no handler defined for http://www.tug.org/fotex:bookmark foreign xml
[ERROR] Couldn't find hyphenation pattern en
[ERROR] Error building hyphenation tree for language en
[ERROR] Couldn't find hyphenation pattern en
[ERROR] Error building hyphenation tree for language en
[ERROR] no handler defined for http://www.tug.org/fotex:bookmark foreign xml
[ERROR] Couldn't find hyphenation pattern en
[ERROR] Error building hyphenation tree for language en
[ERROR] Couldn't find hyphenation pattern en
[ERROR] Error building hyphenation tree for language en
[ERROR] no handler defined for http://www.tug.org/fotex:bookmark foreign xml
[ERROR] Couldn't find hyphenation pattern en
[ERROR] Error building hyphenation tree for language en
[INFO] [7]
[ERROR] no handler defined for http://www.tug.org/fotex:bookmark foreign xml
[ERROR] no handler defined for http://www.tug.org/fotex:bookmark foreign xml
[ERROR] Couldn't find hyphenation pattern en
[ERROR] Error building hyphenation tree for language en
[ERROR] no handler defined for http://www.tug.org/fotex:bookmark foreign xml
[INFO] [8]
[ERROR] no handler defined for http://www.tug.org/fotex:bookmark foreign xml
[INFO] [9]
[ERROR] no handler defined for http://www.tug.org/fotex:bookmark foreign xml
[INFO] [10]
[INFO] [11]
[ERROR] no handler defined for http://www.tug.org/fotex:bookmark foreign xml
[INFO] [12]
[ERROR] no handler defined for http://www.tug.org/fotex:bookmark foreign xml
[INFO] [13]
[INFO] [14]
[ERROR] no handler defined for http://www.tug.org/fotex:bookmark foreign xml
[INFO] [15]
[INFO] [16]
[INFO] [17]
[ERROR] no handler defined for http://www.tug.org/fotex:bookmark foreign xml
[INFO] [18]
[INFO] [19]
[INFO] [20]
[INFO] [21]
[INFO] [22]
[ERROR] no handler defined for http://www.tug.org/fotex:bookmark foreign xml
[INFO] [23]
[ERROR] no handler defined for http://www.tug.org/fotex:bookmark foreign xml
[ERROR] no handler defined for http://www.tug.org/fotex:bookmark foreign xml
[INFO] [24]
[ERROR] no handler defined for http://www.tug.org/fotex:bookmark foreign xml
[ERROR] no handler defined for http://www.tug.org/fotex:bookmark foreign xml
[ERROR] no handler defined for http://www.tug.org/fotex:bookmark foreign xml
[INFO] [25]
[ERROR] no handler defined for http://www.tug.org/fotex:bookmark foreign xml
[INFO] [26]
[INFO] [27]
[ERROR] no handler defined for http://www.tug.org/fotex:bookmark foreign xml
[INFO] [28]
[INFO] [29]
[INFO] [30]
[INFO] [31]
[INFO] [32]
[ERROR] Unknown formatting object http://www.tug.org/fotex^sort
[INFO] [33]
[ERROR] no handler defined for http://www.tug.org/fotex:bookmark foreign xml
[ERROR] no handler defined for http://www.tug.org/fotex:sort foreign xml
[ERROR] no handler defined for http://www.tug.org/fotex:sort foreign xml
[ERROR] no handler defined for http://www.tug.org/fotex:sort foreign xml
[ERROR] no handler defined for http://www.tug.org/fotex:sort foreign xml
[ERROR] no handler defined for http://www.tug.org/fotex:sort foreign xml
[ERROR] no handler defined for http://www.tug.org/fotex:sort foreign xml
[ERROR] no handler defined for http://www.tug.org/fotex:sort foreign xml
[ERROR] no handler defined for http://www.tug.org/fotex:sort foreign xml
[ERROR] no handler defined for http://www.tug.org/fotex:sort foreign xml
[ERROR] no handler defined for http://www.tug.org/fotex:sort foreign xml
[ERROR] no handler defined for http://www.tug.org/fotex:sort foreign xml
[ERROR] no handler defined for http://www.tug.org/fotex:sort foreign xml
[ERROR] no handler defined for http://www.tug.org/fotex:sort foreign xml
[ERROR] no handler defined for http://www.tug.org/fotex:sort foreign xml
[INFO] Parsing of document complete, stopping renderer
rday
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: looking for a couple tweaks for docbook -> FOP
Posted by Jeremias Maerki <de...@greenmail.ch>.
That's the "language" property:
http://www.w3.org/TR/xsl/slice7.html#language
"hyphenate" enables/disables hyphenation altogether.
http://www.w3.org/TR/xsl/slice7.html#hyphenate
On 13.04.2003 11:50:45 Robert P. J. Day wrote:
> On Sun, 13 Apr 2003, Jeremias Maerki wrote:
>
> >
> > On 13.04.2003 00:15:19 Robert P. J. Day wrote:
>
> > > [ERROR] Couldn't find hyphenation pattern en
> > > [ERROR] Error building hyphenation tree for language en
> >
> > The "en" hyphenation pattern had to be removed because of licensing
> > problems. You can use "en_GB" for the moment or switch off hyphenation.
>
> but the question is, where do i set this value/attribute? i looked
> through the entire file of FO parameters. where precisely does
> one specify this value of "en_GB"?
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: looking for a couple tweaks for docbook -> FOP
Posted by "Robert P. J. Day" <rp...@mindspring.com>.
aaargh ... one typo in that previous post:
On Sun, 13 Apr 2003, Robert P. J. Day wrote:
> ------------------------------------------
>
> at this point, you can just run something like:
>
> $ xmlto fopdf -v --extensions -m frag1.xsl -m frag2.xsl -o dbfile.xml
don't use the "-o" option there. just check the man page for
"xmlto" to see how to call it.
rday
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: looking for a couple tweaks for docbook -> FOP
Posted by "Robert P. J. Day" <rp...@mindspring.com>.
On Sun, 13 Apr 2003, Jeremias Maerki wrote:
>
> On 13.04.2003 00:15:19 Robert P. J. Day wrote:
> >
> > starting with red hat's "xmlto" utility and the most recent
> > docbook stylesheets, i hacked the "xmlto" utility to accept a
> > request to use FOP (rather than passivetex) to do the FO -> PDF
> > step, and it's not only *way* faster than passivetex, the output
> > is actually more correct.
>
> HEAR, HEAR!
for those folks who want to take advantage of red hat's *very*
convenient "xmlto" utility, i'll explain what few changes i had to make.
(note: you can check the man page for "xmlto" to see why it's convenient,
and view the script /usr/bin/xmlto as well. it automatically picks the
correct stylesheet for you, and allows you to add additional stylesheet
fragments on top of that with command line options.)
first, in order to have xmlto use a different FO processor, since it
chooses based simply on output suffix, i invented a new suffix, ".fopdf",
for the output file. all this means is if i run "xmlto fopdf ...", i'm
asking xmlto to generate a PDF file whose suffix is .fopdf, and to use
FOP, rather than passivetex, for the FO -> PDF step. (you can pick
whatever suffix you like, of course, but because i'm trying to keep the
hacking to a minimum, you have to pick *some* new suffix. it's still a
PDF output file.)
next, you might want to make one teensy change to /usr/bin/xmlto.
i just copied it to /usr/local/bin to override the built-in
version and added the line:
--extensions)
# Turn on extensions for whatever tools we are using.
# At the moment, it must be for PassiveTeX, since
# that's all we know about.
XSLTOPTS="$XSLTOPTS --param use.extensions '1'"
XSLTOPTS="$XSLTOPTS --param passivetex.extensions '1'"
XSLTOPTS="$XSLTOPTS --param fop.extensions '1'" <--- add
shift
;;
finally, you have to add to the /usr/share/xmlto hierarchy the
formatting scripts that will be chosen automatically. you have to
make two additions. (note: read the following before you make
any changes -- there's an important point at the bottom.)
first, under /usr/share/xmlto/format/docbook, you'll find a number
of files which are invoked to convert docbook to whatever format you
asked for. just make an *exact* copy of "pdf", and call it "fopdf",
so it will be picked automatically when you're generating your
.fopdf file. (you just need to make a copy since xmlto will
still call xsltproc to transform docbook -> FO exactly the way it
did before.)
and second, in the sibling directory, /usr/share/xmlto/format/fo,
you'll find the files "dvi", "pdf" and "ps", which are invoked
when you're converting FO to any of those formats. notice that
the "pdf" script invokes passivetex. just copy this script to
"fopdf" in the same directory, and replace the invocation of
passivetex with one of FOP. mine looks like this, which seems
to work:
------------------------------------------
case "$1" in
stylesheet)
;;
post-process)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Post-process XSL-FO to PDF"
fi
java org.apache.fop.apps.Fop \
-fo "$XSLT_PROCESSED" \
-pdf out.pdf
cp -- out.pdf "$OUTPUT_DIR/$(basename ${XSLT_PROCESSED%.*}).fopdf"
;;
esac
------------------------------------------
at this point, you can just run something like:
$ xmlto fopdf -v --extensions -m frag1.xsl -m frag2.xsl -o dbfile.xml
the output file will be dbfile.fopdf, which should just be standard
PDF. you can compare the results from FOP and passivetex by just running
one of:
$ xmlto pdf ... uses passivetex
$ xmlto fopdf ... uses FOP
using FOP is not only considerably faster, but generates cleaner
output. feel free to compare the two.
IMPORTANT NOTE: for those who do not have access to the root
account and can't wedge a couple new scripts into the system
/usr/share/xmlto hierarchy, "xmlto" allows you to specify where
to find the new scripts with the FORMAT_DIR environment
variable.
i created a directory "xmlto/format" in my home directory,
whose sole contents are the subitems
docbook/fopdf
fo/fopdf
as i described above. when i want to use FOP, i just run
$ FORMAT_DIR=~/xmlto/format xmlto fopdf ...
for all other calls to "xmlto", i just run it regularly.
this is all pretty hacky, so i'm open to improvments.
rday
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: looking for a couple tweaks for docbook -> FOP
Posted by "Robert P. J. Day" <rp...@mindspring.com>.
On Sun, 13 Apr 2003, Jeremias Maerki wrote:
>
> On 13.04.2003 00:15:19 Robert P. J. Day wrote:
> > [ERROR] Couldn't find hyphenation pattern en
> > [ERROR] Error building hyphenation tree for language en
>
> The "en" hyphenation pattern had to be removed because of licensing
> problems. You can use "en_GB" for the moment or switch off hyphenation.
but the question is, where do i set this value/attribute? i looked
through the entire file of FO parameters. where precisely does
one specify this value of "en_GB"?
rday
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: looking for a couple tweaks for docbook -> FOP
Posted by Jeremias Maerki <de...@greenmail.ch>.
On 13.04.2003 00:15:19 Robert P. J. Day wrote:
>
> starting with red hat's "xmlto" utility and the most recent
> docbook stylesheets, i hacked the "xmlto" utility to accept a
> request to use FOP (rather than passivetex) to do the FO -> PDF
> step, and it's not only *way* faster than passivetex, the output
> is actually more correct.
HEAR, HEAR!
> however, even though i get output, i still get the following
> warnings/errors, so can anyone tell me what params (if any) i
> can use to make them go away?
>
> i remember a discussion about language choice for hyphenation,
> but i checked the entire FO parameter list, and all i see is
> a parameter as to whether i want hyphenation or not, nothing
> about a language choice.
> [ERROR] Couldn't find hyphenation pattern en
> [ERROR] Error building hyphenation tree for language en
The "en" hyphenation pattern had to be removed because of licensing
problems. You can use "en_GB" for the moment or switch off hyphenation.
> [ERROR] Unknown formatting object http://www.tug.org/fotex^bookmark
> [ERROR] no handler defined for http://www.tug.org/fotex:bookmark foreign xml
> [ERROR] Unknown formatting object http://www.tug.org/fotex^sort
> [ERROR] no handler defined for http://www.tug.org/fotex:sort foreign xml
The "no handler defined" messages come from a special extension for
passivetex. You need to switch to the equivalent in FOP. See:
http://xml.apache.org/fop/extensions.html
Bookmarks are supported by FOP, but I don't know what that "sort" thing
does.
> anyway, suggestions on how to minimize the following??
I hope that helps.
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org