Re: Printing many, many pages efficiently
Re: Printing many, many pages efficiently
- Subject: Re: Printing many, many pages efficiently
- From: Paul Collins <email@hidden>
- Date: Tue, 3 Dec 2002 14:41:19 -0800
What I've done is this: Subclass NSView (in my case I subclass
NSImageView). In the subclass, implement -knowsPageRange, returning NO
(this turns off AutomaticPagination), and implement -rectForPage. The
latter is called just before printing each page, its parameter is the
page number. You'll have to work out what goes on each page, though.
I'm not releasing the view, which was passed to
-printOperationWithView:. I'm just setting new contents for each page
inside -rectForPage.
For a good discussion of printing, get the Scott Anguish book from SAMS,
Cocoa Programming.
Paul Collins
Gracion Software
On Tuesday, December 3, 2002, at 12:36 PM, Jacob Engstrand wrote:
The question:
How can I set up the printing machinery to call my code once for each
page, so that I can build that page just before it is printed, and then
release it, its subviews and its associated data before building the
next page?
** Gracion Software
http://www.gracion.com/ **
** Tel: +1 (541) 488-3488 **
** DigiTunnel 1.1 PPTP/VPN client for OS X **
_______________________________________________
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.