I experience a lot of troubles when I combine docbook with FOP. A real simple docbook example like :
Turns out in a lot of error code.
I know FOP is the problem. But is there an open source solution so that docbook will generate pdf without all of these error messages? Do you know if a commercial solution like XEP can handle these problems? [ August 06, 2004: Message edited by: Arnold Reuser ]
Joined: Nov 20, 2003
Currently I've implemented the solution with FOP & Docbook in a neat and succesful way. Not all features of xsl-fo are implemented in FOP, so this will result in a lot of errors. But none of them are blocking the process and the the result still looks great. Therefore XEP wasn't necessary.
Yes ofcourse I would like to share this knowledge. Just start by asking a smart question ;-) Where can I post the answer? [ September 29, 2004: Message edited by: Arnold Reuser ]
Joined: Jan 23, 2002
Well, I've tried to set up a "text-based" authoring environment from which I could generate PDFs with a single command etc. but I've never really managed to finish that project (I can't remember where I stumbled with FOP or the stylesheets but there was some problem that I didn't have the energy to solve). So, I was wondering if you would be interested in writing a little tutorial along the lines of "Quickstart to Generating PDFs from Docbook"...
Joined: Nov 20, 2003
Someone else already wrote a nice and short tutorial :
This gives you more than enough information about how to get started with FOP. When you've read this one page tutorial and all you've downloaded all the necessary jars. The next step must be taken : download docbook :
unzip it somewhere and remember that /fo/docbook.xsl is the most interesting file to remember.
When you're done write some run.bat that will do all the hard work for you. While you can drink, relax or sleep a little bit more than you're used to do. When you're a linux adapt, just rewrite the following run.bat file that I've written :
Did you remember the path to docbook.xsl? My path is : ../fo/docbook.xsl Also just put the jars on your classpath. My jars are in lib/ , for example lib/fop.jar
The last part is writing some docbook file. Therefore I've written a small docbook file.
So give it a try! When you're done and succesful, your almost done. Because this is just a bat file processing some docbook file. But that is not a real life example. The java code that can do the job is :
Well and when you did understand every part of it. And you've realized that the performance of the code isn't very good and you can rewrite it in a nice way. Start reading a quick reference :