Can I use PDPageDrawContentsToMemory to render the PDF to a B/W (1 bit) image?
Estimated Reading Time: 1 MinutesWhen rendering via the PDPageDrawContentsToMemory* APIs, specify 1 BPC (Bits per Component) instead of 8 BPC when using DeviceGray as the csAtom. A component here refers to a color channel; Gray has one, RGB has three (red, green, blue), and CMYK has four.
See the mainproc.cpp of the RenderPage sample for usage of PDPageDrawContentsToMemory:
#define BPC 1
#define COLORSPACE "DeviceGray"
There are no external controls for the dithering method used by the Library, although the application can disable the dithering (50% threshold) with the kPDPageNoDither flag.
Also, APDFL does not directly support creating halftone images as it is intended to be a function of the Raster Image Processors (RIP) rather than of the Library. The PDF format includes halftones, and the Library is capable of embedding them, but does not directly create them from a PDF.