On Mar 18, 2010, at 7:17 PM, Jenny M wrote:

> Sorry, no answer, I'm just having a similar issue. I need to print
> columns of text, and all the examples I see indicate a manual creation
> and placement of EACH line of text in an NSRect inside the view. ...
> Is there really no better way to place objects in the view?
> 
> 

if the columns of text match line for line, why not use two NSTextViews side by 
side? You’ll still likely need to handle pagination, but you don’t have to draw 
each one.

A WebKit view may also be another option.

> On Mar 18, 12:47 pm, Brian Postow <[email protected]> wrote:
>> I'm trying to print a document. The document is an array of NSImageReps, or 
>> a single NSPDFImageRep, which has multiple pages. I'm having trouble 
>> figuring out how to use the NSPrintOperation class to print this.  
>> 
>> The NSPrintOperation seems to need an NSView to print. Do I need to manually 
>> add each image into the view at a calculated position and then let it do the 
>> pagination? that seems like it isn't in the spirit of Cocoa... is there some 
>> technique that I'm missing?

Nope, you’re not missing anything. If you want to ensure that pagination 
doesn’t occur during the middle of one of your images, you have to handle that 
yourself.

Our old Cocoa Programming book covered this. The PaginationDemos are still 
available for download at www.cocoaprogramming.net. Mind you, Xcode can’t read 
the project, so you’ll need to make a new project and drag the classes and nib 
in. (or just get the ideas from it).

Chapter 25 examples


_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to