Comment convertir en masse des fichiers .djvu en .pdf?


11

J'ai environ 200 ebooks .djvu que je veux convertir en .pdf.Comme la conversion une par une est fastidieuse, je veux savoir s'il existe un moyen de les convertir toutes en même temps.Toute aide serait appréciée.

10

You could use ddjvu, in a shell script. That said, the output PDFs are much larger (x10), which makes it hardly worth the effort. Ubuntu has no problem reading djvu files, but if your reason is good enough, use the following script.

Warning: Do not try it on 200 files right away. Run a test first on one or two small ones, to get the feel of how long it takes, and to make sure you are satisfied with the result. Press Ctrl + C, in case you want to stop the process.

#!/bin/bash
for i in *.djvu;
do ddjvu -format=pdf -scale=100 "$i" "${i/%.djvu/}.pdf"
done

...or the same, as a one-liner

for i in *.djvu; do ddjvu -format=pdf -scale=100 "$i" "${i/%.djvu/}.pdf";done

Simply run that in a folder with djvu files. The -scale=100 option downscales the output images, which makes the process much faster, and the output files' size more reasonable. Without it, the resulting PDFs were much larger then the originals, and took ages to convert, at least in my tests.


0

Personally I really like Calibre, which is a great for managing, converting, synching, sharing and editing ebooks. You can do batch conversions with it and djvu to PDF is supported. To install, just enter the following via cli:

sudo apt-get install calibre

You can find info on the software at http://calibre-ebook.com/about

I hope it helps. :)