Hi,
I recently came across a very beautiful piece of software called "Prince" (www.princexml.com). It is closed source and does transfer html and other files to pdf - in an imho very beautiful fashion*. Some samples can be found at http://princexml.com/samples/, including pdf files generated from Wikipedia text. There is a free (as in beer) evaulation copy of the software avialable for download, so you can try out the sites yourself. With the help of the special css file (http://www.princexml.com/howcome/2008/wikipedia/wiki2.css) written by Håkon Wium Lie.
Håkon has written a text about this topic at http://www.princexml.com/howcome/2009/wikipedia/infobox/, in which he mentions some of the problems in the transformation effort. At the bottom, there are currently three recommendations.
Before I open a feature request at bugzilla about this, I would like to ask you about the feasibility of a tool that - in case no manual class name is assigned -, template generated tables are given classes and other information to the html text to help identify it, possibly based on the name of the template or the parameter invoked in it.
Mathias
* there are multiple ways to do so, including the open source pediapress project.
mediawiki-l@lists.wikimedia.org