gtkmm book as pdf

Jonathon Jongsma recently fixed up the “Programming with gtkmm” book so the result of docbook2pdf is fairly useable. We’d like to improve it even more and maybe sell hard copies online. But I think we need more control over docbook2pdf (a wrapper for jw). For instance:

  • We need to scale images down instead of cropping them.
  • Ideally, the links to the reference documentation would be real hyperlinks in the PDF.
  • It would be nice to specify a different base URL (an XML entity in our Docbook) for the PDF than for the HTML, to make the URLs absolute instead of relative.
  • A background block for the source code examples would provide some structure.
  • Syntax highlighting of the source code examples would be really nice, but we don’t have that in the HTML either. (It’s inserted in the Docbook automatically, from our real source code.)

Does anyone have experience with this?

Of course, I also plan to review all the text and make improvements to the content where necessary. It’s been a few years since I read it all through.

8 thoughts on “gtkmm book as pdf

  1. Benoît, it definitely has a table of contents, starting on page 3. You can click on the table of contents to jump to a section.

  2. unfortunately, docbook2pdf uses DSSSL stylesheets to control the translation from the dobook file to (TeX and then to) PDF. I know nothing about DSSSL, so customizing the output becomes rather annoying.
    Another alternative is using docbook-xsl stylesheets to generate XSL-FO output, then processing the FO into PDF. The problem with this is that there are very few decent free FO processors. Apache’s FOP (http://xmlgraphics.apache.org/fop/) is probably the most well-known, but it’s not in many distributions and not a complete implementation in any case. But it would be easier for me to deal with a more ‘mainstream’ technology like XSL than DSSSL.
    Hopefully somebody else will chime in with some better options.

  3. Cool!, I’m learning Gtkmm and really wanted a printer friendly copy of this book (Too lazy to make it myself :P). Also Gtkmm rocks! Keep up the good work!

    (sorry for my bad english)

  4. I have used http://dblatex.sf.net (note: *not* db2latex!) in the past and it worked very well for me. I don’t know about the answers to the specific questions (except that it can scale images), but the author is usually pretty responsive. Customizing it is also pretty easy, you do it in LaTeX style sheets.

Comments are closed.