About JBIG2
JBIG2 is a compression algorithm that can be used to compress bi-level (1 bit black-and-white) images. It's considerably more effective than CCITT compression, producing images that are anything from 2 to 5 times smaller. Support for JBIG2 was added in Acrobat 5.0, but due to the complexity of the algorithm support from third party vendors like ourselves has been limited.
Thanks to a couple of open source projects we are now able to offer JBIG2 decoding since 2.7.8 and encoding since 2.7.9, although both of these features rely on external programs written in C/C++ to run. We're only able to offer limited support for these, but we can offer binaries for some platforms and you can of course compile your own - jbig2dec is easy, jbig2enc somewhat harder to build. Details on how to enable decoding/encoding of JBIG2 compressed images are below.
Enabling JBIG2 Decoding in the PDF library
JBIG2 images stored in a PDF file may be decoded using the
jbig2dec program, an open-source
JBIG2 decoder written in C. This requires that you have the jbig2dec
program compiled for your operating system and have set the
org.faceless.pdf2.JBIG2.jbig2dec system property to its location.
On UNIX systems that would typically be something like "/usr/local/bin/jbig2dec",
on Windows something like "C:\jbig2dec.exe".
As a convenience we provide precompiled binaries for version 0.10 of
jbig2dec for a number of operating systems here. The GPL license for
jbig2dec obliges us to supply the source code here too, but we
recommend you check the main site at
jbig2.sourceforge.net instead, so
so you can always get the latest release. Note that although we're unable to
offer support for jbig2dec itself,
Artifex Software do offer commercial support if
you require it.
Binaries for other operating systems gratefully accepted.
Enabling JBIG2 Encoding in the PDF library
Compressing 1-bit images with JBIG2 can be done in a similar manner since 2.7.9,
although be aware this is a much slower algorithm than CCITT.
To enable it you'll need to set your OutputProfile to one where the
FilterJBIG2 feature is set as required. JBIG2 was introduced in
PDF 1.4/Acrobat 5.0, so the Acrobat5Compatible profile includes this
feature, as do the compatibility profiles for more recent versions of Acrobat.
The JBIG2 encoding is done using the
jbig2enc program, an
encoder written in C++. As for decoding, you will need this program compiled for your
operating system and the org.faceless.pdf2.JBIG2.jbig2enc system property
to its location.
Below we provide precompiled binaries for a number of operating systems, and again the source code. We've built binaries from 0.23 with a small patch, which is included in the zip file as "multipagetiff.patch". If you're building from source you'll need to apply this patch (which was included in 0.24, so we recommend you download from the main website instead). Be warned the build process is a little more involved than with the decoder.
Binaries for other operating systems gratefully accepted.