I rewrote that file a few months ago and incorporated it into Bindery (it was a bit messy and I wanted to see how it worked). The PDFs were tiny, but they were all completely bitonal (even the images).
PDFs support image layers and I was able to separate the text from the images and convert the text to JBIG2 and the images to JPEG2000. This resulted in really
tiny source images, but I just can't figure out how to make a layered PDF containing them. I was able to make a PDF with just
the text regions, but I can't stick the colored images in as well.
I'm looking at the source of pdfbeads for help (as it does exactly what I need), but it's a bit complicated to translate into Python. When I have more free time I might give it another go.
If you're interested, my PDF binding module is located here: https://github.com/Blender3D/Bindery/blob/master/binding/encoders/pdf.py