Convert JBIG2 to PDF with free and open source software agl’s jbig2enc

agl’s jbig2enc is an encoder for JBIG2:
www.jpeg.org/public/fcd14492.pdf

JBIG2 encodes bi-level (1 bpp) images using a number of clever tricks to get
better compression than G4. This encoder can:
* Generate JBIG2 files, or fragments for embedding in PDFs
* Generic region encoding
* Perform symbol extraction, classification and text region coding
* Perform refinement coding and,
* Compress multipage documents

It uses the (Apache-ish licensed) Leptonica library:
http://www.leptonica.com/

Jbig2enc can convert other format image to jbig2 or fragments for embedding in PDFs, and pdf.py can convert the fragments to PDF document.
for example, if you want to convert a.bmp to pdf, you can do it in this way
jbig2 -s -p a.bmp
you get output.0000 and output.sym files
python pdf.py output>jbig2.pdf
btw, itext and itextsharp also supports convert jbig2 to pdf now.
After some efforts, I have successfully compiled jbig2 under Window XP with GCC 4.2(MingW32+MSYS), for details and download, please visit Windows version of agl’s jbig2enc, from this page, you can also download the linux compiled version.

reference,
Windows version of agl’s jbig2enc
agl’s jbig2enc home page

Leave a Reply