Reference documentation in PDF
May 18, 2009
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.
May 18, 2009 at 4:59 am
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?
May 18, 2009 at 6:37 am
I’m impressed. It looks pretty good and professional 😉
May 18, 2009 at 7:25 am
You can pretty easy, as all that is required is running “dblatex -T db2latex bla-docs.xml”.
May 18, 2009 at 7:50 am
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.
May 18, 2009 at 12:19 pm
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).
May 18, 2009 at 1:18 pm
[…] Robert describes how to generate PDF files from GNOME documentation source files. […]
May 18, 2009 at 2:37 pm
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.
May 18, 2009 at 3:27 pm
[…] Robert describes how to generate PDF files from GNOME documentation source files. […]
May 25, 2009 at 7:49 pm
[…] Robert describes how to generate PDF files from GNOME documentation source files. […]