Brandon Rozek

Photo of Brandon Rozek

PhD Student @ RPI studying Automated Reasoning in AI and Linux Enthusiast.

Convert DJVU to PDF

Published on

I’ve recently come across the DJVU file format before and needed to convert it to a PDF. The most reliable way I’ve found to do it is via the following command.

djvups FILENAME | ps2pdf - OUTPUT_FILE

Where FILENAME first gets converted to the PS file format which then gets converted to a PDF with the name OUTPUT_FILE. To make things easier, I wrote a little script that does this process automatically while preserving the filename.


set -o errexit
set -o nounset
set -o pipefail

show_usage() {
    echo "Usage: djvu2pdf [FILENAME]"
    exit 1

if [ "$#" -ne 1 ]; then

if ! command -v djvups > /dev/null ; then
    echo "djvups not found. Exiting..."
    exit 1

if ! command -v ps2pdf > /dev/null ; then
    echo "ps2pdf not found. Exiting..."
    exit 1

djvups "$1" | ps2pdf - "${1%.*}.pdf"
Reply via Email

Have you published a response to this? :