The quality of http://www.princexml.com is amazing. It's not open source and there is a cost to use it commercially (<1K, if I recall). I used it to convert my HTML documentation for Sleep into a camera-ready PDF.
http://sleep.dashnine.org/manual/ - original docs http://sleep.dashnine.org/download/sleep21manual.pdf - result