How to embed TIFF using JBIG2 compression?


We understand that PDFNet SDK can embed TIFF and optimize existing PDF
documents to use JBIG2 compression:

  1. Can Tiff => PDF

Can it also in one step embed TIFF as monochrome JBIG2?

  1. Can PDF => PDF (jbig2)

If yes how?


Using PDFNet SDK you can also embed TIFF (i.e. 1 bit per pixel -
monochrome images) using JBIG2 compression.

For an example of how to embed monochrome TIFF using JBIG2
compression, please take a look at AddImage sample project

In C# the code would look as follows:

// JBIG2 Encoder hint --------------------------------
Obj jbig2_hint = Obj.CreateArray() ;

System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(input_path +
pdftron.PDF.Image img = Image.Create(pdfdoc, bmp, jbig2_hint);
pdftron.PDF.Element element = f.CreateImage(img, new Matrix2D(612, 0,
0, 794, 0, 0));

In PDFNet SDK there are some other options to work with JBIG2 but the
above approach is the simplest and the most straightforward.