How to detect whether the page is color one or pure white-black one?

Hi,Support:

Is there any method to detect the color mode of each page of the pdf file to be sent for print is a color one or a pure white-black one? And the color page will be automatically sent to a color priner for pinting by color mode while the white-black ones will be sent to a printer for printing by white-black mode.

Or the api can automatically draws the pure white-black pages into a temp pdf file and then sent it for printing by white-black mode,while automatically draws the color pages into a temp pdf file and then sent it for printing by color mode.

Or the api can detect what color of each page, and then the program merge the color pages into a color temp pdf file ,and the non-color pages into a white-black temp pdf file, finally the program send the color temp pdf to color-printer for printing by color mode,while send the non-color temp pdf to printer for printing by whilte-black mode.
Thanks for your help!

@ducaisoft

You can determine the color type of a PDF page by using the sample code in below article. Please let us know if it suits your requirements: