Re: Saving an annotated PDF to a flat image
Re: Saving an annotated PDF to a flat image
- Subject: Re: Saving an annotated PDF to a flat image
- From: Danny Greg <email@hidden>
- Date: Thu, 25 Sep 2008 11:24:54 +0100
Get the size of said page (-[PDFPage boundsForBox:]) and create an
NSImage of this size (-[[NSImage alloc] initWithSize:]). Lock the
image (-[NSImage lockFocus]) and then call PDFPage;s draw method (-
[PDFPage drawWithBox:]). Unlock focus on the NSImage and you;re done.
Worked like a charm.
Just to up the anti, what do I need to do to save the annotations to a
proper PDF, (ie keeping all its text, link properties etc). I tried to
save off the page's data representation but no matter what I do it
never contains any annotations! Again, I need to accomplish this
without opening the PDF up in a PDFView.
Thanks
Realmac Software
Danny Greg, Cocoa Junior
We are Realmac Software. We make nice things for Apple Macs.
Website: www.realmacsoftware.com
Office 4, 100 North Road
Brighton, BN1 1YE
United Kingdom
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden