Color separation

Product: PDFTron - PDFNet - Java

Product Version: 9.4.0

Please give a brief summary of your issue:
Removing/disabling some colors.

Please describe your issue and provide steps to reproduce it:
I am looking a way to remove some color from PDF file… for instance for a given PDF file I would like to remove/disable “Magenta” color from CMYK color space and save PDF. Have trouble to find appropriate color space and color component.

Any help is welcome, thanks in advance!

Please provide a link to a minimal sample where the issue is reproducible:

1 Like

Thank you for contacting Apryse support.

I’m reviewing your request and will get back to you shortly.

1 Like

Hi Marko,

Take a look at our ElementEdit sample, it shows ways to looping through every element in a PDF and modifying it, including examples of how to get colour space and removing or changing a specific colour:

Let me know how that works for you and if you have any other questions.

1 Like

Thanks kmirsalehi, it helped. So there is no “central” place to removing some color component from color space, but have to iterate through all elements.

1 Like

That’s correct, each element has it’s own graphical state so you need to iterate through each to remove a specific colour.

1 Like