在使用Objective-C iOS创建的PDF中包括ICC颜色配置文件吗? [英] Include ICC Colour Profile in PDF created with Objective-C iOS?

查看:70
本文介绍了在使用Objective-C iOS创建的PDF中包括ICC颜色配置文件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的Objective-C iOS应用中,我正在使用以下代码创建PDF文件:

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
}];

最终目的是将该PDF发送到AirPrinter.

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

但是,由于我们正在使用打印机硬件,因此似乎有必要将ICC颜色配置文件(可能为CMYK)嵌入到PDF中,以确保准确的颜色再现.

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.

我以前在.Net中进行过此类操作,但从未在Objective-C中进行过此类操作,到目前为止,我所有的网络搜索都没有.

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.

是否可以使用上述方法将ICC颜色配置文件嵌入到Objective-C的PDF上下文中,或者如果没有,则可以在Objective-C中产生另一种允许ICC配置文件嵌入的PDF的方法?

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?

推荐答案

经过大量搜索,我得出结论认为这是不可能的.文献很少,通常所指的是Mac OSX,而​​不是iOS. 正如Moose所建议的那样,ColorSync似乎仅限于图像和UI元素,我看不到在PDF创建中包括它的任何方法.闭幕.

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.

这篇关于在使用Objective-C iOS创建的PDF中包括ICC颜色配置文件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆