Create djvu from jpeg - best practices and tutorial? - MathOverflow [closed] most recent 30 from http://mathoverflow.net 2013-05-19T00:55:03Z http://mathoverflow.net/feeds/question/36185 http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://mathoverflow.net/questions/36185/create-djvu-from-jpeg-best-practices-and-tutorial Create djvu from jpeg - best practices and tutorial? darij grinberg 2010-08-20T13:21:48Z 2010-08-20T13:48:12Z <p>This is definitely not a mathematical question, but a relevant one I believe. There are incomplete versions of some books floating around the web and I want to put in the missing pages. There is a good book scanner at our university, albeit I have not really understood most of its functions yet. At the moment I am able to scan color JPGs. So I've got a batch of color JPGs, what next should I do? I want a djvu file.</p> <p>I have tried cpaldjvu from <a href="http://djvu.sourceforge.net/" rel="nofollow">djvulibre</a>, but it seems to hang up on one single jpg. (Size 2MB.) Some people recommend passing through PDF, but this looks like a lot of overhead work to me. Is there a good tutorial for non-experts? (For Windows or Ubuntu - but bear with an Ubuntu noob who barely knows how to install packages. I am able, however, to script a few lines in bash.)</p> <p>Besides, is pre-processing of the JPGs in a graphics editor helpful? Is it of use to cut out the margins, or are they useful for the DJVU encoder to approximate the background color?</p> <p>PS. I think I know how to split DJVU files into pieces and reassemble them. I am only interested in JPG->DJVU here.</p> http://mathoverflow.net/questions/36185/create-djvu-from-jpeg-best-practices-and-tutorial/36187#36187 Answer by Anthony Labarre for Create djvu from jpeg - best practices and tutorial? Anthony Labarre 2010-08-20T13:48:12Z 2010-08-20T13:48:12Z <p>You could write a simple script that converts your images to PDF using <a href="http://www.imagemagick.org/" rel="nofollow">imagemagick</a>, concatenates the resulting files using <a href="http://www.pdfhacks.com/pdftk/" rel="nofollow">pdftk</a> and finally, converts the single PDF file obtained in that way to DjVu using <a href="http://pdf2djvu.googlecode.com/" rel="nofollow">pdf2djvu</a>. I had skipped the part where you said you wanted to avoid the PDF step, but I hope this will come in handy if you change your mind.</p> <p>By the way, if you're using Ubuntu: sudo apt-get install imagemagick pdftk pdf2djvu </p>