There may be an easier way, but personally, I would go for it using the following methods.
To put text on an image, use the NSString method:
- (void)drawInRect:(NSRect)aRect withAttributes:(NSDictionary *)attributes
Then (I assume you want this to persist on your image), use the NSImage method:
NSImage *newImage = [[NSImage alloc] initWithData:[myView dataWithPDFInsideRect:[oldImage frame];
source
share