Image MIME Reference
DjVu
DjVu Document
image/vnd.djvu
VS
PWG Raster Format
image/pwg-raster
PWG-Raster
A complete technical comparison of DjVu Document and PWG Raster Format — covering compression, feature support, browser compatibility, magic bytes, and when to choose each format.
Equal browser support
Feature Support
| Feature | DjVu | PWG-Raster |
|---|---|---|
| Transparency (Alpha) | Yes | ✕ No |
| Animation Support | ✕ No | ✕ No |
| Progressive Loading | Yes | ✕ No |
| HDR Support | ✕ No | ✕ No |
| EXIF Metadata | ✕ No | ✕ No |
| ICC Color Profile | ✕ No | ✕ No |
DjVu Document
image/vnd.djvu
Extension
.djvu.djv
Container
Interchange File Format (IFF)
Compression
JB2 (Bi-tonal Text) / IW44 (Wavelet Background) / BZZ (General Data/Text)
Algorithm
JB2IW44BZZ
Color Depth
1-bit (Foreground Text), 24-bit (Background)
Developed by
AT&T Labs (Yann LeCun, Léon Bottou, Patrick Haffner, Paul G. Howard)
Released
1996
Magic Bytes
41 54 26 54 46 4F 52 4D
PWG Raster Format
image/pwg-raster
Extension
.pwg.ras
Container
CUPS Raster v2 Container
Compression
PackBits (Run-Length Encoding)
Algorithm
PackBits (Apple RLE variant)
Color Depth
1-bit (Monochrome/K), 8-bit (Grayscale), 24-bit (sRGB / Adobe RGB), 32-bit (CMYK)
Developed by
IEEE-ISTO Printer Working Group (PWG)
Released
2011
Magic Bytes
52 61 53 32
Browser Support Comparison
| Browser | DjVu | PWG-Raster |
|---|---|---|
|
|
✕ | ✕ |
|
|
✕ | ✕ |
|
|
✕ | ✕ |
|
|
✕ | ✕ |
|
|
✕ | ✕ |
DjVu
DjVu Strengths
- Unmatched compression ratios for high-resolution scanned documents (often 5 to 10 times smaller than equivalent JPEG/TIFF-based PDFs)
- Separates text layers cleanly from backgrounds, allowing for highly legible text even at low file sizes
- Embedded OCR (Optical Character Recognition) text layers allow for fast searching
Limitations
- Lacks native support in modern operating systems and web browsers, requiring third-party software
- Largely superseded by PDF/A and modern PDF compression standards in standard corporate workflows
- Not suitable for vector graphics or born-digital documents (like Word exports), where standard PDF is far superior
PWG-Raster
PWG-Raster Strengths
- The undisputed global standard for modern, driverless printing environments, eliminating the nightmare of installing manufacturer-specific print drivers
- Extremely lightweight to decode on embedded hardware, requiring minimal RAM buffers on the printer side
- Strict color space and resolution rules guarantee that the printed output will successfully process without syntax errors
Limitations
- Generates massive file sizes and network payloads compared to vector-based formats like PDF or PostScript, as every page is fully rasterized at 300+ DPI before transmission
- No support for native rendering in web browsers, image viewers, or graphic design software without specialized CUPS developer tools
- Cannot store complex metadata, vector text, or layers
When to choose which format
DjVu
Use DjVu when…
- Scanned Books and Manuals
- Digital Libraries (e.g., Internet Archive)
- Historical Document Archiving
PWG-Raster
Use PWG-Raster when…
- Driverless Network Printing (IPP Everywhere)
- Apple AirPrint and Mopria Print Service Pipelines
- CUPS (Common UNIX Printing System) Spooling