• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Saving an annotated PDF to a flat image
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Saving an annotated PDF to a flat image
      • From: John Calhoun <email@hidden>
  • Prev by Date: Horizontal SplitView Resize Question
  • Next by Date: NSURLDownload resumeData example
  • Previous by thread: Re: Saving an annotated PDF to a flat image
  • Next by thread: Re: Saving an annotated PDF to a flat image
  • Index(es):
    • Date
    • Thread