How do I convert a DjVu document to PDF in Linux using only command line tools?
djvu2pdf should fit the bill, it's a small script that makes use of the djvulibre toolset. If not, there are other methods that require multiple command-line tools.
The ddjvu
program, (which is part of the standard djvulibre
package), will do this:
$ ddjvu -format=pdf -quality=85 -verbose a.djvu a.pdf
Warning: this produces large files (but PDF files made by Christoph Sieghart's script are of the same size.)
I also wrote the following small bash
script some years ago.
It does the same automatically. (Save this as djvu2pdf.sh
).
#!/bin/bash
# convert DjVu -> PDF
# usage: djvu2pdf.sh <file.djvu>
i="$1"
echo "------------ converting $i to PDF ----------------";
o="`basename $i .djvu`"
o="$o".pdf
echo "[ writing output to $o ] "
cmd="ddjvu -format=pdf -quality=85 -verbose $i $o "
$cmd
The djvu2pdf
script by Christoph Sieghart does essentially the same
What about simply using DJView and export as PDF?
- Goto Synaptic Package Manager (System - Administration - Synaptic Package Manager)
- Install DJview4
- Run DJview (Applications - Graphics - DJView4)
- Open your .djvu document
- Menu - Export As: PDF
Look at http://art.ubuntuforums.org/showthread.php?t=1232038