This doesn't exactly help you with your problem, but http://wkthtmltopdf.org has always worked way better for me than any of the pure <insert language here> html to pdf renderers. You may check it out next time the need arises. (It's based on QtWebkit, so it's rendering is quite good).
The supplied static builds are preferred for me, as they have patched Qt to improve handling of page break css, added page outlines, &c.