But that link was just background info. I also wrote that “the problem can be fixed with a simple sudo gem install iconv”, which hasn’t changed. It was also conveniently summarized in the comment right above.
Anyway, OCRmyPDF may be one of the better alternatives. It looks like since 2018 it can also output JBIG2, and it can take images as input. This should mean that the final part of the script where tesseract and pdfbeads are executed can probably be replaced with OCRmyPDF. djvubind can also automatically apply tesseract, after all.
]]>These are the steps I used to install pdfbeads on Debian Stretch (Debian 9) in Jan 2018.
When logged in as root..
apt-get install build-essential automake autotools-dev libtool
apt-get install zlib1g-dev (- needed even if you are not using jbig2enc)
apt-get install ruby-rmagick ruby-hpricot ruby-dev
gem install pdfbeads
gem install iconv (- this last step to overcome an 'iconv' load error)
Dennis
]]>