Content incomplete when calling dataWithPDFInsideRect
Content incomplete when calling dataWithPDFInsideRect
- Subject: Content incomplete when calling dataWithPDFInsideRect
- From: Tito Ciuro <email@hidden>
- Date: Sat, 3 Jun 2006 13:52:46 -0700
Hello,
My app has an NSImageView where I drop PDF files. I would like to
retrieve the PDF representation of the imageview content, so I've tried:
NSData *imageData = [_mapImageView dataWithPDFInsideRect:
[_mapImageView frame]];
The problem is that I get the snapshot of the imageview itself + the
visible portion of the content. In other words, as if I had made a
screen capture of the imageview.
Ideally, I'd like to output the content of the imageview to a new
file and see the exact contents and format (PDF) as the original one.
Something like this:
- (IBAction)savePDFData:(id)sender
{
NSData *imageData = [_mapImageView dataWithPDFInsideRect:
[_mapImageView frame]];
// Save to Desktop...
NSString *filePath = [[NSString alloc]initWithFormat:@"%@/
Desktop/TempImageOut.pdf", NSHomeDirectory()];
[imageData writeToFile:filePath atomically:YES];
[filePath release];
}
Thanks for the help,
-- Tito
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden