We generate PDF documents with RGB images stored in a CMS.
As part of the PDF processing we sometimes have the need to convert the RGB images to CMYK (for print productions).
Converting the images from RGB to CMYK seems to be feasible with Python using LittleCMS and the PyLittleCMS bindings (plus the ICC color profiles for the RGB input and CMYK output device).
However is there some Python-based option to iterate over the images inside a PDF, extracting the image data and replacing them with the processed CMYK variants?