Converting any image to PDF
Converting any image to PDF
- Subject: Converting any image to PDF
- From: email@hidden
- Date: Fri, 13 Sep 2002 10:55:03 -0700
I need to get PDF data for any image that someone may hand me. I've
tried the following "hackish" code to do this by way of the NSView API,
but seem to always end up with a PDF of 0 width/height.
imageSize = [image size];
iView = [[[NSImageView alloc] init] autorelease];
[iView setImage:image];
[iView setImageScaling:NSScaleNone];
[iView setBounds:NSMakeRect(0,0,imageSize.width,imageSize.height)];
pdfData = [iView dataWithPDFInsideRect:[iView bounds]];
The use of and NSImageView (iView) here is a total hack as I'm not
actually displaying the image anywhere, I just thought it was a good
starting point. Can someone please tell me how best to go about this
on-the-fly conversion?
Thanks,
- Eric
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.