Today out of (mostly) random curiosity, I wanted to investigate putting gtk-doc/docbook inside pretty PDFs. Googling around there are a lot of solutions, however none of them seem to work too well except dblatex, so for the benefit of anyone else in a similar situation, probably jump straight to this.

I’ve tried running it on a few different things, just to see what the output is like:
http://gnome.org/~racarr/glib-docs.pdf
http://gnome.org/~racarr/pango-docs.pdf

It’s already pretty good, and with a little custom styling (requires making a new LaTeX document class), it could be a lot better. However, I’m not sure how much effort I want to put in, as it’s only somewhat useful.

9 Responses to “Reference documentation in PDF”

  1. Javier Says:

    Hello!

    Thank you for the tip.
    It would be great if you can automatize the pdf generation. (with autotools, for example)

    Do you know if it’s possible?

  2. Juanjo Marin Says:

    I’m impressed. It looks pretty good and professional 😉

  3. racarr Says:

    You can pretty easy, as all that is required is running “dblatex -T db2latex bla-docs.xml”.

  4. Stefan Kost Says:

    I have some boilerplate in gtk-doc (git) for selecting different outputformats. Unfortunately its not that easy. gtk-doc support docbook sgml and docbook xml. dblatex is for docbook sgml (which I like to deprecate) and does not produce anything that error in jade for me. For docbook xml one would need to use apache fop, but neither 0.94 or 0.95 not the latests devel snapshot does really work (I filed bugs, but nothing happens). IMHO the opensource software stack fro producing pdf from docbook is in pretty bad shape.
    gtk-doc sources have a TODO file which gives details to what works and what does not. One question though – what distro are you using? If you like to get this feature into gtk-doc, please come to irc #gtkdoc on gnome-irc.


  5. dblatex also works well for user documentation. We use it to generate Evolution User Guide PDFs every six months: http://projects.gnome.org/evolution/doc/evolution226.pdf (2.6M).


  6. […] Robert describes how to generate PDF files from GNOME documentation source files. […]

  7. bochecha Says:

    I found this while looking at a way to print web pages to PDF:
    http://code.google.com/p/wkhtmltopdf/

    What is good is that you don’t need to redefine the style of your document, it uses WebKit and prints the PDF just like the web page is rendered on a web browser.


  8. […] Robert describes how to generate PDF files from GNOME documentation source files. […]


  9. […] Robert describes how to generate PDF files from GNOME documentation source files. […]


Leave a Reply