How would you save an NSImage to a PDF file with Foundation? This is not a GUI app so AppKit (and therefore NSView) is not in use.
EDIT: Well, I feel silly now. NSImage is part of AppKit, so it is in use. However, my question still stands: how do you save the NSImage to a PDF?
By making a connection to the window server you can use
NSImageandNSView. You can make that connection to the window server by using the AppKit functionNSApplicationLoad.main.m
Compile this with the frameworks Foundation and AppKit linked:
When you compiled it you can use it like this: