POD to PDF?

Ovid on 2009-10-23T21:45:25

I was working with Pod::PseudoPod to create rich, structured documents with the idea that I could create nicely formatted PDFs. So far, the only reasonable way (no, plain text and HTML are not "reasonable") to accomplish this seems to be to emit DocBook xml from the PseudoPod and then convert that to LaTeX or PDF format. However, trying to find a tool which does that on Mac OS X Snow Leopard has left me at a dead end (CPAN libraries which claim to help are falling down badly).

So, what do you use to address this situation? Software which can actually install on OS X would be a bonus. Software which doesn't require me to read through volumes of documentation to figure out that one little setting would also be a bonus. I don't mind a little work, but so far, most software I've found has been miserable (e.g., openjade segfaults and I've no idea why).


Docbook to PDF is XSLT and then FOP

Simon on 2009-10-23T22:26:27

Docbook XSLT stylesheets are available as the docbook-xsl package in fink. FOP you have to download from apache.org but it's Java and it works fine on OS X.

I do a lot of docbook work and so have put together lots of wee makefiles to do this conversion for me.
See something like http://github.com/simoncozens/songbee/blob/master/manual/Makefile for one of them. If you can't get FOP working, then the latexpdf target will do it through latex.

Use LaTeX Directly

chromatic on 2009-10-23T22:52:22

We use Pod::PseudoPod::LaTeX at Onyx Neon with great success.

perldoc | pstopdf

Thos Davis on 2009-10-24T04:23:01

I'm not sure if this is the kind of thing you're looking for, but the following pipeline uses only software available on the default OS X install

perldoc -Tn '/usr/bin/groff -S -mandoc' "$input_pod" | pstopdf -o "$output_pdf" -p -i