I need a program or (preferably) library to convert html to pdf files. The program or library must be free, and not be something I need to do on a web page (as these might disappear for one reason or the other).

I need to make pdf files, but the libraries I've found for that is too limited. So if a good pdf creation lib can be pointed out, that could work just as well.