• 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: How to create paginated PDF Data from NSView without using NSPrintOperation.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to create paginated PDF Data from NSView without using NSPrintOperation.


  • Subject: Re: How to create paginated PDF Data from NSView without using NSPrintOperation.
  • From: Andy Lee <email@hidden>
  • Date: Tue, 21 Mar 2006 23:58:54 -0500

On Mar 21, 2006, at 11:22 PM, Janakiram wrote:
I have a view to display my cocoa application data. Now i want to display the preview of that view in print panel accessory view. So i need to create a paginated pdf document.

How about using NSView's -dataWithPDFInsideRect: method? The doc says:

Returns PDF data that draws the region of the receiver within a specified rectangle.

[...]

This data can be placed on an NSPasteboard object, written to a file, or used to create an NSImage object.

You could combine this with -rectForPage: to create a series of NSImages. There's probably some way to put these together into a single paginated PDF, but if your main purpose is to display a preview, this might suffice.


--Andy

_______________________________________________
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


References: 
 >How to create paginated PDF Data from NSView without using NSPrintOperation. (From: Janakiram <email@hidden>)

  • Prev by Date: Re: Doesn't -sortedArrayUsingDescriptors: use KVC accessors?
  • Next by Date: Re: Doesn't -sortedArrayUsingDescriptors: use KVC accessors?
  • Previous by thread: How to create paginated PDF Data from NSView without using NSPrintOperation.
  • Next by thread: create a cocoa bundle with a custom extension
  • Index(es):
    • Date
    • Thread