Snouto
Snouto

Reputation: 1031

Include ICC Colour Profile in PDF created with Objective-C iOS?

In my Objective-C iOS app I'm creating PDF files using the code:

UIGraphicsPDFRenderer* renderer = [[UIGraphicsPDFRenderer alloc] initWithBounds:pdfSize];
NSData* outputPdfData = [renderer PDFDataWithActions:^(UIGraphicsPDFRendererContext * _Nonnull context) {
    [context beginPage];

    // draw operations here
}];

The ultimate aim is to then send this PDF to an AirPrinter.

However, due to the printer hardware we're using it looks like it is going to be necessary to embed in to the PDF an ICC colour profile (possibly CMYK) to ensure accurate colour reproduction.

I've done such operations before in .Net but never in Objective-C and so far all of my web searching has been for nought.

Is it possible to embed ICC colour profiles in to the PDF context in Objective-C using the above approach, or if not is there another way to produce PDFs in Objective-C that does allow ICC profile embedding?

Upvotes: 4

Views: 233

Answers (2)

Snouto
Snouto

Reputation: 1031

After a lot of searching I've concluded this isn't possible. Documentation is thin on the ground and what does exist usually refers to Mac OSX, not iOS. ColorSync, as suggested by Moose, appears to be restricted to images and UI elements, and I can see no way of including it in PDF creation. Closing.

Upvotes: 1

Moose
Moose

Reputation: 2737

Maybe you could try to create a colorSync profile for the printer you use, and let the system correctly prepare you document for this printer, or any another one..

ColorSync is supported since OS9.3 on iOS Devices.

Upvotes: 0

Related Questions