Take the 2-minute tour ×
MathOverflow is a question and answer site for professional mathematicians. It's 100% free, no registration required.

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.

I have tried cpaldjvu from djvulibre, 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.)

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?

PS. I think I know how to split DJVU files into pieces and reassemble them. I am only interested in JPG->DJVU here.

share|improve this question

closed as off topic by Loop Space, Akhil Mathew, José Figueroa-O'Farrill, Harry Gindi, Gjergji Zaimi Aug 20 '10 at 17:59

Questions on MathOverflow are expected to relate to research level mathematics within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

I think that this is off topic. –  Loop Space Aug 20 '10 at 14:10
@Andrew: of course it is. But it is a question that I think others here have dealt with, probably more so than on StackOverflow. –  darij grinberg Aug 20 '10 at 14:19
Darij, I don't consider that a sufficient argument for this question to be asked here. But then I'm considered quite "hard line" in what I consider acceptable so don't take it personally! –  Loop Space Aug 20 '10 at 15:49
I agree that this is off topic and belongs on a different forum. –  Akhil Mathew Aug 20 '10 at 17:24
I echo Andrew and Akhil -- it is off topic. –  José Figueroa-O'Farrill Aug 20 '10 at 17:35

1 Answer 1

You could write a simple script that converts your images to PDF using imagemagick, concatenates the resulting files using pdftk and finally, converts the single PDF file obtained in that way to DjVu using pdf2djvu. 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.

By the way, if you're using Ubuntu: sudo apt-get install imagemagick pdftk pdf2djvu

share|improve this answer
Thanks a lot. This sounds doable. –  darij grinberg Aug 20 '10 at 16:19

Not the answer you're looking for? Browse other questions tagged or ask your own question.