Q: I'm currently working with your Java PDF SDK, and I cannot find how
to convert an image in CMYK to RGB.
I've tried googling and searching your KB, but I still cannot find any
reasonable way to do this.
If you could supply a working example or even a hint as to how I can
do this, it would be greatly appreciated.
--------
A: You could use ‘pdftron.PDF.Image.Image2RGB’ filter along the lines
of ElementReaderAdv sample:
http://www.pdftron.com/pdfnet/samplecode.html#ElementReaderAdv
After you convert image data to RGB you can add it to the existing PDF
document using pdftron.PDF.Image.Create(...) - along the lines of
AddImage: http://www.pdftron.com/pdfnet/samplecode.html#AddImage
Finally you can swap the old CMYK image with RGB using
doc.getSDFDoc().swap(img1.getSDFObj().getObjNum(),
img2.getSDFObj().getObjNum()).
For example:
http://groups.google.com/group/pdfnet-sdk/t/d6eba10f352ed8e2