Site Map - skip to main content

Hacker Public Radio

Your ideas, projects, opinions - podcasted.

New episodes every weekday Monday through Friday.
This page was generated by The HPR Robot at

hpr2767 :: Djvu and other paperless document formats

A tutorial on how to read and generate djvu files

<< First, < Previous, , Latest >>

Hosted by Klaatu on 2019-03-12 is flagged as Clean and is released under a CC-BY-SA license.
pdf, ebook, bloat, djvu. (Be the first).
The show is available on the Internet Archive at:

Listen in ogg, spx, or mp3 format. Play now:

Duration: 00:32:15


DjVu is a digital document format with advanced compression technology. DjVu allows for the distribution of very high resolution images of scanned documents, digital documents, and photographs. DjVu viewers are available for the web browser (search for djvujs in Firefox for an extension), the desktop ( Evince, Okular an BSD/Linux, and djview on BSD/Linux/Windows/Mac), and mobile devices.

The toolchain for encoding and decoding DjVu is djvulibre

djvu.js is a Javascript library useful for online viewing. contains sample documents and specification documents.

Creating a djvu file

The tool you use to convert something to the .djvu format depends on your requirements. If you're converting a basic, black-and-white document, then cjb2 (part of the djvulibre distribution) works:

$ cjb2 -dpi 300 foo.tiff
$ ls

If you want to convert something more complex, then use c44 (also a part of the djvulibre distribution):

$ c44 -dpi 300 bar.jpg bar.djvu
$ ls

To put both of these files in a single DjVu container:

$ djvm -c baz.djvu foo.djvu bar.djvu
$ ls

You can add bookmarks, too. Open a text file called book.marks (or any name you prefer) and enter:

("Foo" "#1")
("Bar" "#2")

And then apply it to your DjVu file:

$ djvused -e 'set-outline book.marks' -s baz.djvu

There's more you can do with DjVu, but this has been an overview of how I use it.


Subscribe to the comments RSS feed.

Leave Comment

Note to Verbose Commenters
If you can't fit everything you want to say in the comment below then you really should record a response show instead.

Note to Spammers
All comments are moderated. All links are checked by humans. We strip out all html. Feel free to record a show about yourself, or your industry, or any other topic we may find interesting. We also check shows for spam :).

Provide feedback
Your Name/Handle:
Anti Spam Question: What does the letter P in HPR stand for?
Are you a spammer?
What is the HOST_ID for the host of this show?
What does HPR mean to you?