Question

I have some pdf documents and I need to find a way to automate convert all the images included in the pdfs from RGB to CMYK.

I prefer to use c# as programing language. I worked in the past with iTextSharp but it doesn't allow me to do this (it doesn't or I don't know).

The question is: what should I use to extract all the images from a pdf, convert from RGB to CMYK and put all the converted images back (no other changes).

Thanks.

Was it helpful?

Solution

PDF files using only CMYK colorspaces are sometimes called PDF/X. If a commercial library is an option for you, you could give Amyuni PDF Converter a try. There is a web post called "Creating PDF/X-1 or PDF/X-3 with Amyuni PDF Converter" that explains the process you would need to apply: .

Usual dislcaimer applies

OTHER TIPS

I would find a Converter to convert your PDF to HTML and then take all the images out, convert them, update the references and then convert it back to PDF.

You can use this package to convert to HTML: http://sourceforge.net/projects/pdftohtml/

Then you can use the GDI or graphics library to convert between RGB and CMYK. Possibly look into a third party console application to do the conversion, as I am not 100% sure whether GDI can write CMYK, I only know it can read CMYK.

Hope that helps

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top