Q: And want to split a multi-page pdf into individual tif files (1 pdf
page per tif). All good so far. I only have 1 question, how do change
the color to Black and White (monochrome) the tif file ? C# please.
A:
To produce grayscale image you could specify ‘ColorSpace’ parameter as
a hint in the pdfdraw.Export() method. For example:
// In C++
Dict enc_param;
enc_param.Put(“ColorSpace”, new Name(“Gray”)); pdfdraw.Export(page,
filename, “TIFF”, &enc_param);
// In C#
Dict enc_param = Obj.CreateDict();
enc_param.Put(“ColorSpace”, Obj.CreateName(“Gray”));
pdfdraw.Export(page, filename, “TIFF”, enc_param);
For the rest of the code please refer to PDFDraw sample project.