Get the name of a custom color.
char *pdfGetCustomColorName(PDFHandle pdf, int idx)
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.

The string returned by pdfGetCustomColorName should not be modified or freed.

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); }