[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Publican question



On Mon, 2008-02-18 at 09:47 -0500, Jared Smith wrote:
> I'm sure I'll have more questions later, but I figured I'd throw this
> one out here -- Is anyone else able to build PDFs using Publican?  I've
> been playing with it all weekend, but I keep getting errors from FOP
> when I try to build PDFs.  

OK, sorry for the noise on the list... I think I've made some pretty
good progress on tracking down this problem.  To make a long short,
publican is assuming that we're using FOP 0.20, while what's in rawhide
is 0.94.  This meant xsltproc was adding fox:destination elements to
the .fo file, instead of the new fo:bookmarks instead.  To work around
this problem, I had to pass two additional string parameters to xsltproc
(in Makefile.templates):

 --stringparam fop1.extensions 1 --stringparam  fop.extensions 0

That got the .fo file generated so that FOP 0.94 would handle it
correctly, but then FOP died complaining that it couldn't find Batik in
the classpath.  (Which is strange, because I have batik installed.  I'm
wondering if the version of FOP in rawhide needs to be rebuilt with
something to tell it to look for batik, but that's just a wild guess.)
FOP needs batik to render the SVG graphics.  To get around this problem,
I removed the SVG logo from my document, and I passed one more parameter
to xsltproc to tell it to use the .png admonition graphics instead of
the SVG versions:

 --stringparam admon.graphics.extension .png

Ah, lo and behold, I was able to render a PDF!

I'll go ahead and create a diff against Makefile.templates and post it
to bugzilla tomorrow, but this raises a few questions:

1) Do we want the toolchain to be able to detect the version of FOP and
adjust itself accordingly?

2) Do we want to expose other parameters to xsltproc?  In my very
rudimentary home-grown toolchain, I create a custom XSLT stylesheet that
exposes a bunch of settings (paper.type, double.sided, draft.mode,
shade.verbatim, etc.) which imports the standard XSL stylesheet.  Would
this be more manageable in the long run that passing a bunch of
stringparam arguments to xsltproc?  

3) Makefile.templates currently tells FOP to use the fop configuration
file in $(COMMON_CONFIG)/fop/fop-0.20.5.xconf, but that doesn't come as
part of the publican package.  Should we remove the reference (and
assume people have a valid FOP config file in /etc/fop.conf), or expose
this via a variable in the Makefile?  (This isn't a big deal -- I just
thought I'd mention it in passing while I was thinking about it.)

4) Can somebody take a look at why fop isn't seeing batik in the
classpath?  My Java skills are obviously too weak to fix this problem.

-Jared


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]