PDF/A from existing PDF change colorspace to ICCBased
I am writing a conversion for existing PDF files to make them PDF/A compliant. I succeeded already embedding all the fonts, but the color spaces are still a problem.
I have a pdf document with deviceRGB and deviceCMYK colorspace in it.
Since I only can add 1 outputintent, which I do now using CoatedFOGRA39 ICC profile, the resulting file fails validation on www.pdf-tools.com saying A device-specific color space (DeviceRGB) without an appropriate output intent is used.
Is it possible to adapt this pdf document and change the device dependent color spaces to device independent (IICBased) colorspaces?
And if yes, please explain how.