Printing multiple pages using drawRect: (SOLVED)
Printing multiple pages using drawRect: (SOLVED)
- Subject: Printing multiple pages using drawRect: (SOLVED)
- From: Ian was here <email@hidden>
- Date: Fri, 7 Oct 2005 09:40:28 -0700 (PDT)
To all who responded, thank you for your input. OK,
the solution to printing multiple pages was simple,
just had to do some stuff manually.
// Set the range of pages...
- (BOOL)knowsPageRange:(NSRangePointer)aRange
{
aRange->location = 1; // First page (one based)
aRange->length = numOfPages; // Total number of
pages.
return YES;
}
// This method gets called before each page is
printed...
- (NSRect)rectForPage:(int)page
{
pageIndex = page - 1;
return [self bounds];
}
So, if I have several slides, one slide displayed on
the view at a time, and I want to print each slide as
a page. I use knowsPageRange: to set the number of
pages to print and use rectForPage: to draw the next
slide before drawRect: is called during the printing
process.
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
_______________________________________________
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