Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've got some documents in DjVu which I'll like convert to PDF. Is there a way to do this using command line OSS tools?

share|improve this question
add comment

4 Answers

up vote 10 down vote accepted

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.

share|improve this answer
    
What's a pity that, currently there is not djvu2pdf tool in Arch repo and old ver in Arch User repo –  Grzegorz Wierzowiecki Nov 2 '11 at 17:42
add comment

What about simply using DJView and export as PDF?

  1. Goto Synaptic Package Manager (System - Administration - Synaptic Package Manager)
  2. Install DJview4
  3. Run DJview (Applications - Graphics - DJView4)
  4. Open your .djvu document
  5. Menu - Export As: PDF

Look at http://art.ubuntuforums.org/showthread.php?t=1232038

share|improve this answer
    
This is the better and easier solution, thanks! –  woohoo Mar 4 '12 at 2:56
add comment

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

share|improve this answer
add comment

If you don't care about colors and images you can get much smaller files if you drop the colors and use instead:

ddjvu -format=pdf -mode=black input.djvu output.pdf

Texts, codes and formulas looks perfectly, but most of the images are gone

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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