Fwd: Content incomplete when calling dataWithPDFInsideRect
Fwd: Content incomplete when calling dataWithPDFInsideRect
- Subject: Fwd: Content incomplete when calling dataWithPDFInsideRect
- From: Lon Giese <email@hidden>
- Date: Sat, 3 Jun 2006 14:48:43 -0700
Have you tried to:
get the image from the image view, then get the PDF represenatation
from the image, then get the data from the representation?
- (NSData *)PDFRepresentation
Returns the PDF representation of the receiver. The returned PDF data
is a copy of the data used to create the receiver.
WooHoo the ultimate Mac App for 'The Sims 2' power users.
http://www.modthesims2.com/showthread.php?p=1239629
On Jun 3, 2006, at 1:52 PM, Tito Ciuro wrote:
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:
email@hidden
This email sent to email@hidden
_______________________________________________
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