开发者

what kind of file is public.composite-content (kUTTypeCompositeContent)?

i'm writing a file importer and want to handle pdf types. i see the com.ado开发者_运维技巧be.pdf (kUTTypePDF) and also public.composite-content type.

Uniform Type Identifiers Reference docs :

Base type for mixed content. For example, a PDF file contains both text and special formatting data.

can someone kindly give an example of this type of file ?


The com.adobe.pdf identifier inherits from public.composite-content. In other words, PDF documents are a specific subset of all documents that conform to public.composite-content.

As you can see in the reference documentation, there are many types that conform to public.composite-content, such as com.apple.rtfd (for RTF documents), com.apple.webarchive and public.presentation for presentation files (Keynote, Powerpoint etc).

The main distinguishing feature of public.composite-content files is that they combine different specific types of data in one file, as opposed to types inheriting from public.data which are just binary blobs. I personally think the distinction is not exactly clear-cut but there you go.

If you want to handle PDF types, you just need to declare conformance to com.adobe.pdf.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜