See:
Tool for editing and merge files and documents in DjVu format from LizardTech. Currently not maintained.
djvulibre:
$ ddjvu -format=tiff book.djvu book.tiff $ tiff2pdf -o book.pdf book.tiff
or directly:
$ ddjvu -format=pdf book.djvu book.pdf
For 'pdftoppm' install xpdf (both Linux and Cygwin):
$ pdftoppm -mono -r 600 -aa yes $PREFIX.pdf $PREFIX $ for pbm in $PREFIX*.pbm; do cjb2 -dpi $DPI $pbm $pbm.djvu; rm -f $pbm; done $ djvm -c $OUTFILE $PREFIX*.pbm.djvu
JPEG to high quolity DjVu (DjVuPhoto encode):
$ c44 -dpi $DPI $FROM.jpg $TO.djvu
JPEG to low colour DjVu:
$ cpaldjvu -dpi $DPI -colors $NCOLORS $i $i.djvu $ djvm -c $OUTFILE *.djvu # Many .djvu to single .djvu.
JPEG to bitonal DjVu:
$ convert $PAGE.jpeg $PAGE.pbm $ cjb2 -dpi $DPI $PAGE.pbm $PAGE.djvu $ djvm -c $OUTFILE *.djvu # Many .djvu to single .djvu.
if you don't like default delev of balck adjust options:
$ convert -solarize 50% -level 0,50% $PAGE.jpeg $PAGE.pbm
or:
$ convert $PAGE.jpeg pgm:- | pgmtopbm -value 0.499 > page.pbm