I've found wkhtmltopdf, which looks good on the surface and works fine in very small cases, but it doesn't provide any real css control over the rendering.
By that I mean it doesn't use the print media type and page breaks are not respected, as well, on windows you can't control the names of some header/footer variables, or generate a TOC off of teh h1 tags.
Are there any real open source alternatives, I've tried xhtml2pdf which is a python library actually called pisa, but it requires reportlab which doesn't play nice windows.
I'm actually programming in .net but if its good and open source, the language isn't a huge issue.