The Google search led me down the wrong path, so here is the gist of it:
Install chm2pdf, which is in the repositories starting with Ubuntu 8.04
sudo apt-get install chm2pdf
Get help with
Convert with for example (all three “dashes” are double dashes half eaten by WordPress):
chm2pdf –continuous –no-links –quiet input_file.chm
The input file name should not contain any special characters or spaces, otherwise you might get all kinds of “File not found” errors, regarding for example urlslist.txt and other files. So rename your input file accordingly.
This process is far easier than working extract_chmLib and htmldoc.