'MuPDF - How to save the separations to png or gray image using MUPDF C++

I am developing a pdf separation viewer app using Mupdf (c++) library.

I need to know is there any possibility to on/off the separation/colors.

Or else export all separation/colors into separate png files.

I trying multiple methods. but it didn't work. Because MuPDF hasn't better documentation.

enter image description here

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source