DjVu libraries for Python
There are 2 Python libraries for DjVu:
- python-djvulibre (
djvulibre-pythonon PyPI) wraps the DjVuLibre C library. It renders pages into buffers of any pixel format, reads the text layer, outline and annotations as s-expressions, and saves documents. You need DjVuLibre and a C compiler to install it, and it doesn’t build on Windows. GPL-2.0. - djvu-rs has binary wheels for Linux, macOS and Windows with no system dependencies. It renders pages to Pillow or NumPy, extracts text, converts to PDF, EPUB and TIFF, and edits metadata, bookmarks and the text layer. MIT.
Pick djvu-rs for easy installation, Windows and a permissive license. Pick python-djvulibre when you need exact DjVuLibre behavior or already depend on DjVuLibre tools such as ocrodjvu.
- djvu-rs djvu-rs is a pure-Rust DjVu library with Python bindings and no native dependencies. How to install it, render DjVu pages with Pillow, extract text.
- python-djvulibre python-djvulibre is the Python binding for DjVuLibre. How to install it, open a DjVu file, render pages with Pillow, extract the text layer, outline.