Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
10
rated 0 times [  10] [ 0]  / answers: 1 / hits: 8008  / 3 Years ago, tue, september 28, 2021, 6:25:31

I have about 200 .djvu ebooks which I want to convert into .pdf. Since one-by-one conversion is tiresome I want to know if there is a way to convert them all at once. Any help will be appreciated.


More From » 12.04

 Answers
2

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.


[#32436] Wednesday, September 29, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
weamp

Total Points: 197
Total Questions: 115
Total Answers: 92

Location: Mauritania
Member since Sun, May 7, 2023
1 Year ago
;