• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

docbook & FOP

 
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Arnold Reuser
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Would you be interested in writing up your "setup" for the rest of us to mimick?
 
Arnold Reuser
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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"...
 
Arnold Reuser
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Someone else already wrote a nice and short tutorial :

http://www.sagehill.net/docbookxsl/InstallingAnFO.html

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 :

http://prdownloads.sourceforge.net/docbook/docbook-xsl-1.66.1.zip?download

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 :

http://www.csis.gvsu.edu/~adams/XML/docbook_quickref.html

Or start reading :

http://www.sagehill.net/book-description.html

Welcome to the real world ;-)
[ September 30, 2004: Message edited by: Arnold Reuser ]
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Arnold!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic