How do I rasterize PDF as CCITT G4 dithered TIFF?

Q:

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,
System.Drawing.Imaging.ImageFormat.Tiff,???
-----
A:

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

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
http://en.wikipedia.org/wiki/Dithering) to produce optimal bi-tonal
approximation of the grayscale image.