pdfGetNumCustomColors

Get the number of custom (spot) colors.
int pdfGetNumCustomColors(PDFHandle pdf)
This function returns the number of custom colors (a.k.a. spot colors) used on the pages specified in the last call to pdfAnalyzePages.

The pdfGetCustomColorName and pdfGetCustomColorCMYK functions provide descriptions of the custom colors.

The pdfGetNumCustomColorObjects function returns the number of objects drawn in each custom color.

C:
int nColors, nObjects, i; unsigned int cmyk; /* analyze page 1 */ pdfAnalyzePages(pdf, 1, 1); nColors = pdfGetNumCustomColors(pdf); for (i = 0; i < nColors; ++i) { name = pdfGetCustomColorName(pdf, i); cmyk = pdfGetCustomColorCMYK(pdf, i); nObjects = pdfGetNumCustomColorObjects(pdf, i); printf("%d objects drawn in the %s custom color = CMYK 0x%08x\n", nObjects, name, cmyk); }
pdfGetCustomColorName
pdfGetCustomColorCMYK
pdfGetNumCustomColorObjects