To prepare the conversion from HTML and URL to PDF and PS, we need python itself, the
htmldoc generator and the
pyhtmldoc plugin. (I gave links to my forks, because I made some changes that have not yet been crammed into the original repository. You can also use the
ready-made image .)
First, import the plugin with the command
from _pyhtmldoc import *
To convert from HTML and URL to PDF and PS, use the commands
pdf = file2pdf('file.html'.encode(), None)