How do I rasterize PDF as CCITT G4 dithered TIFF?


I am trying to test the export of PDF pages to TIFF, but cannot find
how to specify a CCITT Group 4 compression, and a dithered or not
image. Please help me with this as soon as possible.

draw.Export(itr.Current(), outname,

To export monochrome, dithered and G4 compressed TIFF images you only
need to specify BPC parameter in encoder 'hints' dictionary. For

pdftron.SDF.Obj encoder_param = pdftron.SDF.Obj.CreateDict();
encoder_param.Put("BPC", pdftron.SDF.Obj.CreateNumber(1));
draw.Export(page, "out.tif", "TIF", encoder_param);

The above parameters are using an advanced dithering algorithm to produce optimal bi-tonal
approximation of the grayscale image.