gammacgcontextdrawpdfpage

Gamut / Color space problems when using CGContextDrawPDFPage


I'm rendering a PDF file on iPad using core graphics.

The colors however look different to the PDF when opening it using OS X preview or acrobat.

Here is a picture with the left being from Acrobat, the right being in iOS simulator:

enter image description here

Does anyone have an idea what I could be doing wrong? I'm not doing anything fancy with my graphics context, except translation/scaling, clipping and then calling CGContextDrawPDFPage

(So far I have only tried on the iOS simulator. )


Solution

  • You need to use RGB profile, not CMYK profile.

    You can transform your PDF with a Quartz Filter. It will integrate a new color profile in your document, like "Apple RGB".