I dont think a php class will be the best for render an xHtml page with css.
What happen when a new css rule come out? (soon css 3.0...)
The best way to render an html page is, obvisiuly, a browser.
Firefox 3.0 can natively 'print' in pdf format, torisugary developed an extension (command line print) to use it. Here you'll find it.
Anyway, there are still many problmes runninr firefox just as a pdf converter...
At the moment, i think that wkhtmltopdf is the best (that is the one used by the safari browser), fast, quick, awesome.
Yes, opensource as well...
Give it a look