Alastair’s Place

Software development, Cocoa, Objective-C, life. Stuff like that.

NSImage and PDF

One thing that seems to annoy people about NSImage is the fact that although you can get TIFF data by using the -TIFFRepresentation method, there is no obvious way to turn one directly into a PDF. This seems like an odd omission when you consider that Quartz directly supports PDF… anyway, I thought I’d rectify the situation by posting some code that implements a -PDFRepresentation< method.

If you want to take a look, it’s in my mercurial repository.