GIMP 3.0 plug-in for exporting JBIG2-encoded PDF files
JBIG2 is an efficient image compression format for bi-level (bi-tonal) images, which is supported by the PDF file format and common PDF viewers, but which lacks widely available tooling for its generation. GIMP is an open-source image editing suite, which has the capacity to output multipage PDF files, but does not support exporting in the JBIG2 format. jbig2enc is an open-source encoder for JBIG2 images; however, as a command-line tool it is somewhat cumbersome to integrate into a standard document-editing workflow.
GIMP has recently released version 3.0 RC1, finalising the 3.0 version of its plugin API. In view of this, I present file-jbig2pdf, a GIMP 3.0 plugin for exporting JBIG2-encoded PDF files, with support for multipage PDFs.
file-jbig2pdf adds a file format to the GIMP Export As… dialog, ‘Portable Document Format (JBIG2)’, which produces a (possibly multipage) PDF document, where the images of the pages are encoded using JBIG2. This produces significant reductions in file size for bi-level images.
file-jbig2pdf has only been tested on Linux, and requires GIMP with Python integration, and additionally requires jbig2enc to be installed for performing the actual JBIG2 encoding. Full usage instructions and source code are available at https://yingtongli.me/git/gimp-file-jbig2pdf.