Get the number of custom (spot) colors.
int pdfGetNumCustomColors(PDFHandle pdf)
The pdfGetNumCustomColors and pdfGetCustomColorName functions provide access to the list of custom colors (a.k.a. spot colors) used on the pages specified in the last call to pdfAnalyzePages.

The pdfGetNumCustomColorObjects function will return the number of objects drawn in a specified custom color.

int i, n, k; /* analyze page 1 */ pdfAnalyzePages(pdf, 1, 1); n = pdfGetNumCustomColors(pdf); for (i = 0; i < n; ++i) { name = pdfGetCustomColorName(pdf, i); k = pdfGetNumCustomColorObjects(pdf, i); printf("%d objects drawn in the %s custom color\n", count, name); }