wkhtmltopdf is a shell utility to convert html to pdf using the webkit rendering engine, and qt. The project also distributes wkhtmltoimage, which is an easy tool to produce web pages screenshots.
NodeBox is a Mac OS X application that lets you create 2D visuals (static, animated or interactive) using Python programming code and export them as a PDF, an image or a Quicktime movie. NodeBox is free and well-documented.