Skip to Content

Can I use PDPageDrawContentsToMemory to render the PDF to a B/W (1 bit) image?

Estimated Reading Time: 1 Minutes

When rendering with PDPageDrawContentsToMemory, specify 1 Bits per Component (BPC) instead of 8 BPC when using DeviceGray as the csAtom. A component here refers to a color channel; RGB has three (red, green, blue), while CMYK has four.

See the DrawTomemory sample for usage of PDPageDrawContentsToMemory.

There are no external controls for the dithering method used by the Library, though the application can disable the dithering (50% threshold) with the kPDPageNoDither flag [r].

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.

Can I use PDPageDrawContentsToMemory to render the PDF to a B/W (1 bit) image?
  • COMMENT